Container Service for Kubernetes (ACK) supports hot migration from ACK dedicated clusters to ACK Pro clusters. You can dynamically migrate your workloads from existing ACK dedicated clusters to ACK Pro clusters. This way, you can benefit from the features that are provided by ACK Pro clusters. This topic describes how to migrate workloads from an ACK dedicated cluster to an ACK Pro cluster.

Prerequisites

  • An ACK dedicated cluster is created. For more information, see Create an ACK dedicated cluster.
  • The Cloud Assistant client is installed on the master nodes of the cluster. For more information, see Overview and Install the Cloud Assistant client.
  • The specification of the internal-facing Server Load Balancer (SLB) instance that is associated with the cluster must be slb.s1.small or higher.
  • Make sure that all pods are migrated to worker nodes, except for the following pods: pods of control plane components, such as the API server, kube-controller-manager, cloud controller manager (CCM), and pods of DaemonSets that belong to the kube-system namespace. Control plane components are replaced by managed components after the migration is completed.
  • An Object Storage Service (OSS) bucket is created in the region of the ACK dedicated cluster that you want to migrate. For more information, see Create buckets.
    Important Do not enable hotlink protection for the OSS bucket. Otherwise, you may fail to migrate the cluster. For more information, see Hotlink protection.

Precautions

  • Make sure that the Kubernetes version of your ACK dedicated cluster is 1.16 or later. Otherwise, you must first upgrade the Kubernetes version. For more information about how to upgrade the Kubernetes version of a cluster, see Update the Kubernetes version of an ACK cluster.
  • If the internal-facing SLB instance of your cluster is a shared-resource instance, the instance specification must be slb.s1.small or higher. For more information about how to upgrade an SLB instance, see Modify the configurations of pay-as-you-go CLB instances.
  • If an ACK dedicated cluster exposes the Kubernetes API server through an Internet-facing SLB instance, you cannot access the Kubernetes API server by using this Internet-facing SLB instance after you migrate workloads from the ACK dedicated cluster to an ACK Pro cluster. To enable access to the Kubernetes API server over the Internet, you must manually associate an elastic IP address (EIP) with the internal-facing SLB instance that is attached to the Kubernetes API server. For more information, see Control public access to the API server of a cluster.
  • After the migration is completed, take note of the following limits:
    • The master nodes no longer belong to the cluster and change to the Unknown state.
    • You cannot migrate workloads from the ACK Pro cluster to an ACK dedicated cluster.
    • The Elastic Compute Service (ECS) instances in the ACK dedicated cluster are not automatically removed. You must manually remove these ECS instances.

Hot migration from ACK dedicated clusters to ACK Pro clusters

  1. Log on to the ACK console.
  2. In the left-side navigation pane of the ACK console, click Clusters.
  3. On the Clusters page, find the ACK dedicated cluster that you want to manage and click Migrate to ACK Pro in the Actions column.
  4. In the Migrate to ACK Pro dialog box, click precheck to go to the Container Intelligence Service console and complete the precheck.
    precheck.png
    1. On the Migration Check page of the Container Intelligence Service console, click Start.
    2. In the Migration Check panel, select the check box below Warning and click Start.
    After the precheck is completed:
    • If the cluster fails to pass the precheck, you can follow the instructions on the Migration Check page to view further information about the failure.
    • If the cluster passes the precheck, proceed to the next step.
  5. In the Migrate to ACK Pro dialog box, click RAM console to grant the permissions that are required to perform the migration. Then, click OK.
    To migrate workloads from an ACK dedicated cluster to an ACK Pro cluster, you must perform the following operations to grant the required permissions.
    1. In the Migrate to ACK Pro dialog box, click RAM console.
      migrate
    2. On the details page of the master Resource Access Management (RAM) role, click a policy whose name starts with k8sMasterRolePolicy.
      70
    3. On the details page of the policy, click Modify Policy Document on the Policy Document tab.
    4. In the Modify Policy Document panel, add the following content to the Statement section and then click OK.
      ,
              {
                  "Action": [
                      "oss:PutObject",
                      "oss:GetObject"
                  ],
                  "Effect": "Allow",
                  "Resource": [
                      "acs:oss:*:*:<YOUR_BUCKET_NAME>/*"  
                  ]
              }
      Note Replace <YOUR_BUCKET_NAME> in the policy with the name of the OSS bucket that you specified.
      The following figure shows the modified policy content. Policies
    After the migration is completed, the cluster type automatically changes from ACK Dedicated to ACK Pro. The status of the master nodes is Unknown. You can perform the following steps to check the node status:
    1. On the Clusters page, find the cluster that you want to manage and click Details in the Actions column.
    2. In the left-side navigation pane of the details page, choose Nodes > Nodes.
    3. On the Nodes page, check the status of master nodes in the Role/Status column.

Remove master nodes after the hot migration is completed

After you migrate workloads from the ACK dedicated to an ACK Pro cluster, you can manually remove the master nodes from the cluster. ACK does not allow you to remove master nodes in the ACK console. You must use kubectl to remove master nodes.

Before you run the commands, make sure that a kubectl client is connected to the cluster. For more information about how to use kubectl to connect to a cluster, see Connect to ACK clusters by using kubectl.

  1. Run the following command to query the names of the master nodes that you want to remove:
    kubectl get node | grep master
  2. Run the following command to remove a master node:
    kubectl delete node <MASTER_NAME>
    Note Replace <MASTER_NAME> with the name of the master node that you obtained in the previous step.

What to do next

If you migrate workloads from an ACK dedicated cluster installed with cGPU Basic Edition to an ACK Pro cluster, you must upgrade to cGPU Professional Edition in the ACK Pro cluster after the migration is completed. For more information, see Upgrade cGPU Basic Edition to cGPU Professional Edition in an ACK Pro cluster.