You can migrate application workloads between OpenShift Container Platform 4.2 clusters with the Cluster Application Migration (CAM) tool. The CAM tool enables you to control the migration and to minimize application downtime.
The CAM tool’s web console and API, based on Kubernetes Custom Resources, enable you to migrate stateful and stateless application workloads at the granularity of a namespace.
You must have
cluster-admin privileges on all clusters.
You must configure a replication repository that is accessible to the source and target clusters.
The Cluster Application Migration (CAM) tool enables you to migrate Kubernetes resources, persistent volume data, and internal container images from an OpenShift Container Platform source cluster to an OpenShift Container Platform target cluster, using the CAM web console or the Kubernetes API.
Migrating an application with the CAM web console involves the following steps:
Installing the Cluster Application Migration Operator on all clusters
The Cluster Application Migration Operator installs the CAM tool (CAM web console and Migration controller) on the target cluster by default. You can change this configuration in order to install the CAM tool on another cluster.
If the CAM tool is not installed on the target cluster, you must configure cross-origin resource sharing on the target cluster and add the target cluster to the CAM web console.
Configuring cross-origin resource sharing on the source cluster, to enable communication between the cluster’s API server and the CAM tool
Configuring the replication repository, an intermediate object storage that the CAM tool uses to migrate data
Adding the source cluster to the CAM web console
Adding the replication repository to the CAM web console
Creating a migration plan, with one of the following data migration options:
Copy: The CAM tool copies the data from the source cluster to the replication repository, and from there to the target cluster.
Move: The CAM tool unmounts a remote volume (for example, NFS) from the source cluster, creates a PV resource on the target cluster pointing to the remote volume, and then mounts the remote volume on the target cluster. Applications running on the target cluster use the same remote volume that the source cluster was using. The remote volume must be accessible to the source and target clusters.
Although the replication repository does not appear in this diagram, it is required for the actual migration.
Running the migration plan, with one of the following options:
Stage (optional) copies data to the target cluster without stopping the application.
Staging can be run multiple times so that most of the data is copied to the target before migration. This minimizes the actual migration time and application downtime.
Migrate stops the application on the source cluster and recreates its resources on the target cluster. You have the option of migrating the workload without stopping the application.