Performing a failover of a TrueCopy pair or Universal Replicator pair using the DR Operator

Replication Plug-in for Containers Installation and User Guide

Version
3.18.x
Audience
anonymous
Part Number
MK-92ADPTR155-10
ft:lastEdition
2026-07-07

Failing over a TrueCopy or Universal Replicator pair using the DR Operator promotes the secondary volume to primary, enabling continued data access and operations from the recovery site when the original primary site becomes unavailable.

Verify the failover is running from the secondary site.
  1. Apply the DR policy with desiredState set to failover. Enter:
    kubectl patch drpolicy <drpolicy-cr-name> --type=merge -p '{"spec":{"desiredState":"failover"}}'
  2. Verify if the DR policy is applied on both the primary and secondary sites. Enter:
    kubectl get drpolicy

    Sample output:

    kubectl get drpolicy 
    NAME                  SOURCE_CLUSTER   TARGET_CLUSTER   REPLICATION_TYPE   DESIRED_STATE   STATUS      CTG_ID   AGE
    sample-app-drpolicy   site-61          site-62          sync               failover        Unhealthy   21       20m
  3. Verify the replication status of the PVCs. Enter:
    kubectl get replication -A

    Sample output:

    NAMESPACE   NAME                                               STATUS   DESIREDSTATE   OPERATION   AGE
            wp-app      replication--my-app-drpolicy--wp-content-pvc       Failover   failover       none        139m
            wp-db       replication--my-app-drpolicy--mysql-data-mysql-0   Failover   failover       none        139m
            wp-db       replication--my-app-drpolicy--mysql-logs-mysql-0   Failover   failover       none        140m
    Note:
    • After a failover is completed, the VMs power on and the deployment pods scale up at the secondary site. The process might take some time, depending on the environment and workload size.
    • If the namespace range for an application differs between the primary and secondary sites, the pods may not scale up automatically and an error message will be displayed. To resolve this issue, update the fsGroup value to the namespace range of the secondary site.