As the workload of your Kubernetes cluster increases or decreases, the resources of the cluster may become idle or insufficient. To improve resource utilization, Container Service for Kubernetes (ACK) allows you to change the configurations of worker nodes in a flexible manner.
Usage notes
During the draining process, ACK drains a node and evicts pods from the node to other available nodes based on the PodDisruptionBudgets (PDBs) that are configured for the pods. To ensure high service availability, we recommend that you use a multi-replica deployment strategy to distribute workloads across multiple nodes. You can also configure PDBs for key services to control the number of pods that are interrupted at the same time.
Unexpected risks may arise when you upgrade or downgrade the configurations of a worker node. We recommend that you back up the data on the node before you change the configurations of the worker node.
When you change the configurations of a worker node, the node remains in the Unschedulable state.
Procedure
You can also change the configurations of multiple nodes that belong to the same node pool or different node pools in batches. Before you the configurations of a worker node, we recommend that you refer to Suggestions on choosing ECS specifications for ACK clusters to select an appropriate instance specification for the node.
The following steps describe how to change the configurations of a subscription worker node. For more information about how to change node configurations, see Overview of instance configuration changes.
Change the configurations of a node
Log on to the ACK console. In the left-side navigation pane, click Clusters.
On the Clusters page, find the cluster that you want to manage and click its name. In the left-side navigation pane, choose .
On the Nodes page, find the node that you want to manage and choose
in the Actions column. In the Drain message, click Confirm to drain the node.Click the instance ID of the node to go to the instance details page. On the Instance Details tab, you can view the details of the instance, such as the instance type.
In the Configuration Information section of the Instance Details tab, click Change on the right side of the instance type. The Change Instance Type dialog box appears.
Select the new instance type that you want to use, confirm the estimated cost, and then click Confirm Change and Pay.
In the Stop Instance dialog box, set the Stopped By parameter and click OK. For more information about how to stop an instance, see Stop an instance.
After you complete the configuration change, click Start Instance and Return. In the Start Instance dialog box, click OK. Wait until the node is re-added to the cluster and enters the Ready state. Choose
in the Actions column and then set the node to schedulable.
Change the configurations of multiple nodes in batches
You can perform the following steps to change the configurations of multiple nodes in batches:
When you change the configurations of multiple nodes that belong to different node pools in batches, the original Elastic Compute Service (ECS) instances are not replaced. In addition, the custom node configurations are retained.
When you change the configurations of multiple nodes that belong to the same node pool in batches, the original ECS instances are replaced by new ones. In addition, the custom node configurations are deleted.
Change the configurations of multiple nodes that belong to different node pools in batches
Log on to the ACK console. In the left-side navigation pane, click Clusters.
On the Clusters page, find the cluster that you want to manage and click its name. In the left-side navigation pane, choose .
On the Nodes page, select the nodes that you want to manage and click Drain in the lower part of the page. In the Drain dialog box, click OK to drain the node.
Log on to the ECS console. In the left-side navigation pane, choose .
Select the ECS instances that you want to manage and choose
in the lower part of the page.Start the instances and wait until the instances are re-added to the cluster and enter the Ready state. Then, select the nodes and click Set Node Schedulability in the lower part of the page to set the nodes to schedulable.
Change the configurations of multiple nodes that belong to the same node pool in batches
Log on to the ACK console. In the left-side navigation pane, click Clusters.
On the Clusters page, find the cluster that you want to manage and click its name. In the left-side navigation pane, choose .
On the Node Pools page, find the node pool that you want to manage and click Edit in the Actions column. Change instance types in the Instance Type section based on your business requirements and click Confirm.
After you change the instance types used by the node pool, manually scale out the node pool to add new nodes of the new instance types.
After new nodes are added to the node pool and enter the Ready state, choose
in the left-side navigation pane.On the Nodes page, find the original nodes and choose
in the Actions column. In the Drain message, click Confirm to drain the original nodes.Confirm that the workloads run as expected on the new nodes and then remove the original nodes.
References
Upgrade or downgrade the configurations of a master node in an ACK dedicated cluster