All Products
Search
Document Center

Container Service for Kubernetes:Migrate applications across regions and clusters

Last Updated:Jun 23, 2026

Use the backup center to back up and restore applications in ACK clusters across regions for disaster recovery.

Before you begin

Review these constraints before proceeding.

Constraint Detail
Storage type Supports only applications and volumes on Alibaba Cloud disks. Other storage types cannot migrate with volume data intact.
Stateful apps with non-Alibaba Cloud storage Clear Backup Volume for these applications. Otherwise, cross-region recovery fails.
Destination cluster version The destination cluster must run Kubernetes 1.18 or later to restore cloud disk data from Elastic Compute Service (ECS) snapshots.
Destination cluster storage plugin The destination cluster must use the Container Storage Interface (CSI) storage plugin. Clusters using FlexVolume, or both CSI and FlexVolume via csi-compatible-controller, are not supported.
Resources being deleted Resources being deleted during backup are excluded.
Backup repository immutability Backup repositories are immutable after creation and can only be deleted. Recreating one with the same name does not work in clusters that used the original.
ACK dedicated and registered clusters For self-managed Kubernetes clusters on ECS, verify ECS disk snapshot permissions before using cross-region volume recovery. See Install the migrate-controller backup service component and configure permissions.

Prerequisites

Make sure you have:

Preparations

This example uses the following setup:

  • Backup cluster: ACK Pro cluster Cluster_BJ in the China (Beijing) region

  • Recovery cluster: ACK Pro cluster Cluster_SZ in the China (Shenzhen) region

  • Backup repository: Associated with an OSS bucket in the China (Beijing) region

Step 1: In the China (Beijing) region, create an OSS bucket with a name that starts with cnfs-oss-***.

If a qualifying OSS bucket already exists in this region, skip this step.

Step 2: Create a stateful Nginx application in the default namespace of Cluster_BJ.

cat << EOF | kubectl apply -f -
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: web
spec:
  selector:
    matchLabels:
      app: nginx
  serviceName: "nginx"
  replicas: 1
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
        - name: nginx
          image: nginx:1.14.2
          ports:
            - containerPort: 80
              name: web
          volumeMounts:
            - name: www
              mountPath: /usr/share/nginx/html
  volumeClaimTemplates:
    - metadata:
        name: www
        labels:
          app: nginx
      spec:
        accessModes: [ "ReadWriteOnce" ]
        storageClassName: "alicloud-disk-topology-alltype"
        resources:
          requests:
            storage: 20Gi
EOF

Step 1: Create a backup repository

The backup center stores backup data in OSS. Create a repository if none exists.

Note
  • The network between a backup repository and its OSS bucket is configured automatically, affecting backup upload and download speeds.

    • Same region (cluster and OSS bucket): PrivateLink is used.

    • Different regions (cluster and OSS bucket, as in cross-region scenarios): Uses a public network connection. Enable public network access before proceeding. See Enable public network access for a cluster.

  • Backup repositories are immutable after creation and can only be deleted. Recreating one with the same name does not work in clusters that used the original.

See Create a backup repository.

Step 2: Back up the application in Cluster_BJ

Important

Cross-region migration supports only stateless applications and stateful applications using Alibaba Cloud disks exclusively. For other stateful applications, clear Backup Volume to prevent recovery failures.

See Create a backup schedule or an immediate backup.

Step 3: Restore the application in Cluster_SZ

See Restore applications and volumes.

Step 4: Verify the migration

Confirm the Nginx application is running correctly in Cluster_SZ.

Using kubectl:

kubectl get pods -n default
kubectl get pvc -n default

Confirm the Pod status is Running and the PersistentVolumeClaim (PVC) is Bound.

Using the console:

  1. Log on to the Container Service Management Console. In the left-side navigation pane, click Clusters.

  2. On the Cluster_SZ management page, in the left-side navigation pane, choose Workloads > StatefulSets.

  3. In the Actions column for the Nginx application, click Details, then click the Pods tab. Confirm the application status is Running.

Next steps