All Products
Search
Document Center

Container Service for Kubernetes:Node pool updates

Last Updated:Jul 07, 2023

This topic describes how to update a node pool without affecting the data disks. The system runs a precheck before updating a node pool. You can update the kubelet, OS image, and container runtime in any combination based on your business requirements.

Usage notes

When the system updates a node pool by replacing system disks, the nodes in the node pool are drained. The system performs pod eviction based on the specified PodDisruptionBudget (PDB) during node draining and the graceful shutdown period of pods is 30 minutes. If the pods on a node are not completely evicted within 30 minutes, the node is still updated. For more information, see PodDisruptionBudgets.

Feature overview

The node pool update feature allows you to update the following components in any combination.

Component

Description

Update procedure

Consideration

Kubelet

When the control plane uses a new kubelet version, you can update the kubelet on all nodes in a node pool to the new version. The new kubelet version that a node pool can use depends on the kubelet version used by the control plane.

  • If you select only Kubelet Update, an in-place update is performed to update the kubelet.

  • If you also select OS Image Update, the update method that is used to update the OS image is applied.

  • If you also select Upgrade Node Pool by Replacing System Disk, the kubelet is updated by replacing the system disks of nodes.

For more information about the update notes for the kubelet, see Update clusters.

OS image

If a new OS image version is available, you can update the OS image of the nodes in a node pool to the new version.

After you select OS Image Update, the node pool is updated by replacing the system disks of the nodes in the node pool You can select Create Snapshot before Update to create a snapshot for the nodes in the node pool.

To update the OS image of the nodes in a node pool, the system replaces the system disks of the nodes in the node pool in batches. Therefore, do not store important data in the system disks or back up the data before you update the node pool. The data disks are not affected by the update.

Container runtime

If a new container runtime version is available, you can update the container runtime of the nodes in a node pool to the new version.

After you select Runtime Update, the node pool is updated based on the following rules:

  • If you change the runtime from Docker to containerd, the change is applied by replacing the system disks of the nodes in the node pool.

  • If you choose to update the containerd version, an in-place update is performed on the node pool by default. You can select Upgrade Node Pool by Replacing System Disk to perform the update by replacing the system disks of nodes instead.

You can select Create Snapshot before Update to create snapshots for the nodes in the node pool.

  • If the runtime update is performed by replacing system disks, back up the data in system disks of the nodes in the node pool before the update and do not store important data in the system disks. The data disks are not affected by the update.

  • During the runtime update, pod probes and lifecycle hooks may fail to run, and pods may perform in-place restarts.

Note
  • To use the node pool update feature, make sure that the node pool contains at least one node.

  • The system automatically runs a precheck before updating a node pool. The precheck can help identify potential issues that can occur during the update.

  • When the system replaces the system disks of the nodes in a node pool, the system uses the node pool configuration to render the node component parameters. This ensures that the configurations of the node components and node pool are the same.

Procedure

  1. Log on to the ACK console and click Clusters in the left-side navigation pane.

  2. On the Clusters page, click the name of a cluster and choose Nodes > Node Pools in the left-side navigation pane.

  3. On the Node Pools page, find the node pool that you want to update and choose More > Upgrade.

  4. Select the component that you want to update and click Precheck.

    Note

    If the cluster fails to pass the precheck or the precheck result contains warnings, refer to Suggestions on how to fix cluster issues to troubleshoot the issues or click View Details to view detailed information on the Report page.

  5. Select the component that you want to update and click Start Update. You can configure Batch Update Policy to specify the nodes to be parallelly updated in each batch.

    Node pool update

What to do next

During the update process, you can perform the following operations in the Event Rotation section:

  • Pause the update: If you want to pause the update, click Pause.

  • Resume the update: If you want to resume the update, click Continue.

  • Cancel the update: If you want to cancel the update, click Cancel.

Pause node pool update

Do not perform operations after you pause the node pool update. In addition, we recommend that you resume and complete the update at your earliest convenience. If the update is paused for more than 7 days, the system automatically terminates the update process. The events and log data that are generated during the update process are also deleted.

FAQ

How do I restore data from snapshots?

You can create a snapshot for the nodes in a node pool when you update the node pool. By default, the snapshot is retained for 30 days. You can manually delete the snapshot before its retention period ends. If the data is lost after you update a node pool, you can use the following methods to restore the data:

  • If an in-place update is performed to update only the kubelet, you can use the snapshot to roll back the disk. For more information, see Roll back a disk by using a snapshot.

  • If the OS image or container runtime is updated by replacing the system disks of the nodes in the node pool, you can create a disk from the snapshot. For more information, see Create a disk from a snapshot.

Can I roll back a node pool after I update the node pool?

You cannot roll back the kubelet and container runtime after you update them. You can roll back only the OS image after you update it. Make sure that the original OS image that you want to use is supported by the node pool.

How do I update free nodes?

Nodes that are not added to node pools are called free nodes. Free nodes exist in clusters that were created before the node pool feature is released. To update a free node, add the node to a node pool and then update the node pool. For more information about how to add a free node to a node pool, see Add free nodes to a node pool.

References