Change operating system
ACK regularly releases new OS image versions with new features, optimizations, and bug fixes. Update your node pool's OS image to the latest version, or switch to a different OS type, such as replacing an end-of-life (EOL) OS with a supported one.
See OS image release notes for supported OS types, image versions, and usage limitations.
Usage notes
-
This operation replaces system disks in batches to update the OS (disk replacement upgrade). Do not store important data on system disks, or back it up in advance. Data disks are not affected. Perform this operation during off-peak hours.
-
When nodes are upgraded by disk replacement, ACK drains the nodes and evicts the Pods on the nodes to other available nodes in accordance with the Pod Disruption Budget (PDB). To ensure high service availability, we recommend that you deploy multiple replicas and spread workloads across multiple nodes, and configure a PDB for critical workloads to control the number of Pods that can be disrupted at the same time.
The default timeout period for node draining is 30 minutes. If the Pod migration is not complete within the timeout period, ACK terminates the upgrade to ensure service stability.
-
When nodes are upgraded by disk replacement, ACK reinitializes the nodes based on the current configuration of the node pool, such as the node logon method, labels, taints, OS image, and runtime version. Normally, the node pool configuration must be updated by Edit a node pool. If you have changed the nodes through other methods, these changes are overwritten during the upgrade.
-
If a Pod on a node references a HostPath volume that points to the system disk, the data in the HostPath directory is lost after the disk replacement upgrade.
-
If you have made configuration changes to the cluster, for example, enabled a SWAP partition, or modified the kubelet or runtime configuration by logging on to nodes instead of using the ACK console or the API (for the supported method, see Customize node pool kubelet configurations), the cluster upgrade may fail or your custom configurations may be overwritten.
-
If you manually change the operating system of a single node, the operating system of the node no longer matches the default configuration of its node pool. This does not affect the normal operation of the node. The next time you change the operating system through Node Pools, the node is reinitialized based on the current configuration of the node pool, and the manual change is overwritten. We recommend that you manage OS upgrades uniformly through the node pool.
-
Some ACK operating systems use cgroup v2 by default. Review the cgroup v2 overview for related considerations.
-
If you have orphaned nodes (worker nodes not managed by a node pool), migrate them to a node pool.
-
In ContainerOS 3.4.0 and later, the system disk is read-only and requires an attached data disk for startup. Follow the procedure below when upgrading to ContainerOS 3.4.0 or later. Other versions are not affected.
-
If you customize the GPU driver version by specifying a version number or by using an OSS URL, the OS and driver may become incompatible after the update. See Supported NVIDIA driver versions in ACK to select a compatible driver.
Procedure
To avoid compatibility risks, run a precheck before updating the OS image or changing the OS type.
-
Log on to the ACK console. In the left navigation pane, click Clusters.
-
On the Clusters page, click the name of your cluster. In the left navigation pane, click .
-
In the Actions column of the Node Pools list, select
> Change Operating System for the target node pool. -
Click Precheck to scan in advance for risks related to the OS image change, and view the check results.
-
Normal: Precheck passed. Proceed with the update.
-
Abnormal: Does not affect the operation or status of the current cluster. Fix issues by following the recommended solutions.
-
-
After the precheck passes, configure the following parameters and click Start Replacement.
Parameter
Description
Destination version
Target OS image and version.
Current version
The current OS version.
Update Node
Nodes to update. Select all or specific nodes.
Ignore Warnings
Whether to proceed if the precheck reports node-pool-level warnings. For example, a pod uses a
hostPathpointing to the system disk.Batch Replace
Maximum Number of Nodes per Batch
Maximum nodes updated concurrently per batch.
Automatic Pause Policy
Pause policy for the OS replacement process when nodes are updated in multiple batches. By default, the OS replacement is not paused. You can also choose to pause after the first batch of nodes is updated, or after each batch of nodes is updated. If you select only one node, only one batch exists and this policy does not take effect.
Interval Between Batches
Interval between batches when Automatic Pause Policy is Do Not Pause. Valid values: 5 to 120 minutes.
Auto Snapshot
Create a snapshot for a node whose system disk stores important business data, before you update the OS, to enable backup and restore. Snapshots incur snapshot fees. Delete unneeded snapshots after the update.
ImportantBefore you change the OS, review the OS image release notes to avoid OS-related compatibility risks.
References
-
To upgrade kubelet and container runtime versions, see Upgrade a node pool.
-
See Reference: In-place updates and updates by replacing system disks.