Failover an application within synchronous DR in airgapped bare metal
In the event of a disaster, when one of your Kubernetes clusters becomes inaccessible, you have the option to failover the applications running on it to an operational Kubernetes cluster.
The following considerations are used in the examples on this page. Update them to the appropriate values for your environment:
- Source Cluster is the Kubernetes cluster which is down and where your applications were originally running.
- Destination Cluster is the Kubernetes cluster where the applications will be failed over to.
- The Zookeeper application is being failed over to the destination cluster.
Follow the instructions on this page to perform a failover of your applications to the destination cluster. These instructions apply to both scenarios, whether it is a controlled failover or a disaster recovery.
Prerequisite
You must ensure that Stork version 24.2.0 or newer is installed on both the source and destination clusters.
If you are using a Stork version prior to 24.2.0, then you can follow this procedure to perform a failover.
Perform failover
- Disaster recovery
- Controlled failover
In the event of a disaster, you can migrate an application or workload from the source cluster to destination cluster by running the storkctl perform failover
command.
You can include or exclude a subset of namespaces for migration by using one of the following flags:
--include-namespaces
- Use this flag to include a subset of namespaces for the migration.--exclude-namespaces
- Use this flag to exclude a subset of namespaces for the migration.
The --include-namespaces
and --exclude-namespaces
flags are mutually exclusive.
Are your clusters paired in a unidirectional manner? (Click to expand for more details)
--skip-source-operations
flag to skip the source cluster operations.To start the failover operation, run the following command in the destination cluster:
storkctl perform failover -m <migration-schedule> -n <migration-schedule-namespace>
Example:
storkctl perform failover -m migration-schedule -n zookeeper
Started failover for MigrationSchedule zookeeper/migration-schedule
To check failover status use the command : `storkctl get failover failover-migration-schedule-2024-05-20-140139 -n zookeeper`
If your source cluster is accessible and you want to migrate an application or workload from the source cluster to destination cluster, you can perform a controlled failover by running the storkctl perform failover