In a rolling upgrade, a new node is created, existing workloads are migrated to the new node, and then the old node is deleted. Figure 1 shows the migration process.
A key pair is used for identity authentication when you remotely log in to a node. If no key pair is available, click Create a key pair.
Go back to the node pool list. In the node list, you can view that the new node pool has been created and is in the Normal state.
kubectl taint node [node] key=value:[effect]
In the preceding command, [node] indicates the IP address of the node where the workload to be migrated is located. The value of [effect] can be NoSchedule, PreferNoSchedule, or NoExecute. In this example, set this parameter to NoSchedule.
To reset a taint, run the kubectl taint node [node] key:[effect]- command to remove the taint.
In the preceding command, [node] indicates the IP address of the node where the workload to be migrated is located.
During workload migration, if node affinity is configured for the workload, the workload keeps displaying a message indicating that the workload is not ready. In this case, click the workload name to go to the workload details page. On the Scheduling Policies tab page, delete the affinity configuration of the original node and click Add Simple Scheduling Policy to configure the affinity and anti-affinity policies of the new node. For details, see Simple Scheduling Policies.
After the workload is successfully migrated, you can view that the workload is migrated to the node created in 1 on the Pods tab page of the workload details page.
After the workload is successfully migrated and is running properly, choose Resource Management > Nodes to delete the original node.
In the node pool list, locate the node pool to which the original node belongs.
A key pair is used for identity authentication when you remotely log in to a node. If no key pair is available, click Create a key pair.
Go back to the node pool list. In the node list, you can view that the new node pool has been created and is in the Normal state.
If you need to reset the taint, enter the new values or click Delete.
During workload migration, if node affinity is configured for the workload, the workload keeps displaying a message indicating that the workload is not ready. In this case, click the workload name to go to the workload details page. On the Scheduling Policies tab page, delete the affinity configuration of the original node and click Add Simple Scheduling Policy to configure the affinity and anti-affinity policies of the new node. For details, see Simple Scheduling Policies.
After the workload is successfully migrated, you can view that the workload is migrated to the node created in 1 on the Pods tab page of the workload details page.
After the workload is successfully migrated and is running properly, choose Resource Management > Node Pools to delete the original node.