All Products
Search
Document Center

Container Service for Kubernetes:Upgrade or downgrade node resources

Last Updated:Jan 15, 2025

In a Kubernetes cluster, dynamic workload changes can lead to resource surplus or shortage. To optimize resource utilization, ACK enables flexible reconfiguration of worker nodes to adjust the cluster's resource configuration.

Notes

  • The node drain operation will evict pods from the node to other active nodes, respecting the Pod Disruption Budget (PDB). For high service availability, we recommend using a multi-replica deployment strategy to distribute workloads across multiple nodes and configuring PDB for critical services to manage simultaneous pod disruptions.

  • The operation may pose unexpected risks. Ensure data backup before proceeding.

  • During the operation, the backend will mark the target node as unschedulable.

Procedure

You can reconfigure a single node or batch reconfigure nodes within the same or across multiple node pools. Before reconfiguring, consult the ECS instance type configuration recommendations to select the appropriate worker node type.

This guide focuses on pay-as-you-go worker node reconfiguration. For additional upgrade or downgrade methods, refer to the Overview of Upgrade or Downgrade Methods.

Single node reconfiguration of instance type

  1. Log on to the ACK console. In the left-side navigation pane, click Clusters.

  2. On the Clusters page, find the cluster that you want to manage and click its name. In the left-side navigation pane, choose Nodes > Nodes.

  3. On the Nodes page, in the Operation column of the target node, select More > Node Drain, and in the dialog box, click Confirm to drain the existing pods on the node.

  4. Click the instance ID of the target node to navigate to the Instance Details page to view information such as the instance type.

  5. On the Instance Details page, in the Configuration Information tab, click Replace on the right side of the instance type to proceed to the Change Instance Type page.

  6. Select the desired instance type, review the estimated cost, and click Stop Instance And Continue.

  7. In the Stop Instance dialog box, select a Stop Mode, and click Confirm. For details on stopping instances, refer to Stop Instance.

  8. After the reconfiguration is complete, click Start Instance And Return. In the Start Instance dialog box, click Confirm. Wait for the reconfigured node to automatically join the cluster and the status to update to Ready. In the Operation column of the target node, select More > Scheduling Settings, set it to schedulable, and finalize the worker node's resource reconfiguration.

Batch reconfiguration of instance type

Nodes within a cluster can be batch reconfigured in two ways:

  • Batch change the instance type of nodes across multiple node pools: This method retains the ECS instances and preserves the custom configurations within the node instances.

  • Batch change the instance type of nodes within the same node pool: This method replaces existing ECS instances, and all new nodes in the node pool will be of the new instance type, but custom configurations within the instances will not be preserved.

Batch change the instance type of nodes in multiple node pools

  1. Log on to the ACK console. In the left-side navigation pane, click Clusters.

  2. On the Clusters page, find the cluster that you want to manage and click its name. In the left-side navigation pane, choose Nodes > Nodes.

  3. On the Nodes page, select the nodes to be reconfigured, click Node Drain below, and in the dialog box, click Confirm to drain the existing pods on the nodes.

  4. Log on to the ECS Console, and in the left-side navigation pane, select Instances And Images > Instances.

  5. In the cluster, select the nodes to be reconfigured, and at the bottom of the page, select More > Upgrade Or Downgrade > Change Instance Type.

  6. Restart the corresponding instances, wait for the reconfigured nodes to automatically rejoin the cluster and update to Ready status. Select the reconfigured nodes, click Set Scheduling Status below, and set them to schedulable to complete the worker node resource reconfiguration.

Batch change the instance type of nodes in the same node pool

  1. Log on to the ACK console. In the left-side navigation pane, click Clusters.

  2. On the Clusters page, find the cluster that you want to manage and click its name. In the left-side navigation pane, choose Nodes > Node Pools.

  3. On the node pool list page, click Edit in the Operation column of the target node pool row, change the Instance Type of the node pool, and then click Confirm.

  4. After changing the instance type, add new type instances through Manually Scale Out Node Pool.

  5. Once the new type instances are added and the status is Ready, in the left-side navigation pane, select Node Management > Nodes.

  6. On the Nodes page, in the Operation column of the old type node row, select More > Node Drain, and in the dialog box, click Confirm to drain the existing pods on the node.

  7. After confirming that the services are running normally, Remove Old Type Nodes to finalize the worker node resource reconfiguration.

References

Upgrade or Downgrade the Resources of ACK Dedicated Cluster Master Nodes