Add node IP addresses to DRClusters
Add node IP addresses to DRClusters, enabling fencing prior to application failover.
Procedure
- Find the IP addresses for all of the OpenShift nodes in the managed clusters by running
this command in the Primary-managed cluster and the Secondary-managed cluster.
oc get nodes -o jsonpath='{range .items[*]}{.status.addresses[?(@.type=="ExternalIP")].address}{"\n"}{end}'
Example output:10.70.56.118 10.70.56.193 10.70.56.154 10.70.56.242 10.70.56.136 10.70.56.99
Once you have the IP addresses then the
DRCluster
resources can be modified for each managed cluster. - Find the DRCluster names on the Hub Cluster.
oc get drcluster
Example output:NAME AGE ocp4perf1 5m35s ocp4perf2 5m35s
- Edit each DRCluster to add your unique IP addresses, replacing
<drcluster_name>
with your unique name.oc edit drcluster <drcluster_name>
apiVersion: ramendr.openshift.io/v1alpha1 kind: DRCluster metadata: [...] spec: s3ProfileName: s3profile-<drcluster_name>-ocs-external-storagecluster ## Add this section cidrs: - <IP_Address1>/32 - <IP_Address2>/32 - <IP_Address3>/32 - <IP_Address4>/32 - <IP_Address5>/32 - <IP_Address6>/32 [...]
Example output:drcluster.ramendr.openshift.io/ocp4perf1 edited
Note: There could be more than six IP addresses.Modify this DRCluster configuration also for IP addresses on the Secondary-managed clusters in the peer DRCluster resource (for example, ocp4perf2).