Updated on 2024-09-02 GMT+08:00

Migrating a Node

You can migrate nodes between node pools within a cluster. Table 1 lists migration scenarios.
Table 1 Migration scenarios

Migration Scenario

Migration

Operation

Source Node Pool

Target Node Pool

Custom node pool

Default node pool (DefaultPool)

Supported

Migrate nodes from a custom node pool to the default node pool.

Default node pool (DefaultPool)

Custom node pool

Supported by clusters of v1.23 or later

Migrating Nodes from the Default Node Pool to a Custom Node Pool

Custom node pool

Custom node pool

Not supported

None

Migrate nodes from a custom node pool to the default node pool.

  1. Log in to the CCE console and click the cluster name to access the cluster console.
  2. In the navigation pane, choose Nodes and click the Node Pools tab.
  3. Click View Node in the Operation column of the node pool to be migrated.
  4. Choose More > Migrate in the Operation column of the target node to migrate the node.

    Figure 1 Migrating nodes to the default node pool

  5. In the displayed Migrate Node dialog box, confirm the information.

    • The migration does not affect custom resource tags, Kubernetes labels, and taints of the node.
    • After the migration, system labels cce.cloud.com and cce-nodepool on the node will be deleted. If an existing workload uses these labels for affinity or anti-affinity scheduling, the existing pods on the node will be stopped and rescheduled when kubelet is restarted.

Migrating Nodes from the Default Node Pool to a Custom Node Pool

Nodes cannot be migrated to spot pricing node pools.

  1. Log in to the CCE console and click the cluster name to access the cluster console.
  2. In the navigation pane, choose Nodes and click the Node Pools tab.
  3. Locate the target node pool and choose More > Accept Node.

    Figure 2 Migrating nodes to a custom node pool

  4. In the Accept Node dialog box, select the nodes that meet the following conditions:

    • The nodes and the current node pool are deployed in the same VPC and subnet.
    • The nodes and the current node pool belong to the same enterprise project.
    • The nodes and the current node pool are in the same cloud server group.
    • The billing mode of the nodes is supported by the current node pool.
    • The nodes are running and they are from the default node pool.
    • The flavor, AZ, resource reservation, container engine, and OS configurations of the nodes are the same as those of the node pool.

  5. Click OK.

    • After nodes are migrated into a node pool, the pool's resource tags, Kubernetes labels, and Kubernetes taints will be synchronized to the nodes. If there is a conflict, the node pool's configurations will take precedence.
    • After the migration, the pool's security group will take over the nodes' original security group.
    • After the migration, the pool's agency will take over the nodes' original agency.
    • After the migration, the nodes' original login mode will remain unchanged.
    • After a node is migrated to a node pool after being accepted by the cluster, its acceptance tag will be removed. Scaling in the node pool may result in the removal of the node.