In a Kubernetes cluster, workloads change dynamically. This can lead to a surplus or shortage of resources. To improve resource utilization, Alibaba Cloud Container Service for Kubernetes (ACK) lets you change the instance type of worker nodes to adjust the resource configuration of your cluster.
Draining a node evicts its pods to other available nodes according to the configured Pod Disruption Budget (PDB). To ensure high availability, deploy your workloads as multiple replicas across different nodes. Also, configure PDBs for critical services to control how many pods can be disrupted at the same time.
This operation involves risks. We recommend that you back up your data before you proceed.
During this operation, the target node is set to an unschedulable state.
Before you upgrade or downgrade a node pool, you must disable auto scaling if it is enabled. To do this, switch the Scaling Mode to Manual. After the upgrade or downgrade is complete, you can re-enable auto scaling.
Procedure
You can change the instance type of a single node or change the instance types of multiple nodes from the same or different node pools in a batch operation. Before you begin, see ECS instance type recommendations to select a suitable instance type for your worker nodes.
This topic describes how to change the instance type of pay-as-you-go worker nodes. For more information about other upgrade and downgrade methods, see Overview of upgrade and downgrade methods.
Change the instance type of a single node
Log on to the ACK console. In the left navigation pane, click Clusters.
On the Clusters page, click the name of the one you want to change. In the left navigation pane, choose .
On the Nodes page, find the target node and choose in the Actions column. In the dialog box that appears, click OK to drain the pods from the node.
After the node is drained, click the instance ID of the node to open the Instance Details page. You can view information such as the instance type.

On the Instance Details page, in the Configuration Information section, click Change next to the instance type to open the Change Instance Type page.

Select the target instance type, confirm the estimated cost, and click Stop Instance and Continue.
In the Stop Instance dialog box, select a Stop Mode and click OK. For more information about how to stop an instance, see Stop an instance.
After the configuration change is complete, click Start Instance and Return. In the Start Instance dialog box that appears, click OK. Wait for the node to automatically join the cluster and for its status to change to Ready. In the Actions column of the node, choose and make the node schedulable. This completes the resource configuration change for the worker node.
Change instance types in batches
You can change the instance types of multiple nodes in a cluster in one of the following two ways.
Change the instance types of nodes from multiple node pools. This method does not replace the ECS instances and retains custom configurations within the node instances.
Change the instance type of nodes in the same node pool. This method replaces the existing ECS instances. All new nodes added to the node pool use the new instance type, but custom configurations within the instances are not retained.
Change the instance types of nodes in multiple node pools
Log on to the ACK console. In the left navigation pane, click Clusters.
On the Clusters page, click the name of the one you want to change. In the left navigation pane, choose .
On the Nodes page, select the checkboxes for the nodes that you want to reconfigure. Then, click Drain Node at the bottom of the page. In the dialog box that appears, click OK to drain the existing pods from the nodes.
After the nodes are drained, log on to the ECS console. In the navigation pane on the left, choose .
Select the checkboxes for the nodes that you want to modify. At the bottom of the page, choose .
Change the instance type.
Select the target instance types.
In the Target Instance Type column, select an instance type for each node, and then click Next.

Proceed to the next step based on the instance status.
If all instances are in the Stopped state, click Next.
If any instance is in the Running state, click Stop All, and then click Next.
ImportantWhen you stop an instance, set Stop Mode to Standard Stop Mode. If you select Economical Mode, the compute resources (vCPU and memory) are reclaimed, and the instance may fail to restart due to insufficient inventory.
Stopping an instance causes service interruptions. Perform this operation during off-peak hours.

Confirm the fees and click Confirm Change.
Start the instances. Wait for the nodes to automatically join the cluster and for their status to change to Ready. Select the checkboxes for the nodes, click Set Schedulability at the bottom of the page, and make the nodes schedulable. This completes the resource configuration change for the worker nodes.
Change the instance types of nodes in the same node pool
Log on to the ACK console. In the left navigation pane, click Clusters.
On the Clusters page, click the name of the target cluster. In the navigation pane on the left, choose .
On the Node Pools page, find the target node pool and click Edit in the Actions column. Change the Instance Type for the node pool and click OK.
After you change the instance type, manually scale out the node pool to add instances of the new type.
Wait for the new instances to be added and for their status to change to Ready. Then, in the navigation pane on the left, choose .
On the Nodes page, find a node that has the old instance type and choose in the Actions column. In the dialog box that appears, click OK to drain the pods from the node.
After you confirm that your services are running as expected, remove the nodes that have the old instance type. This completes the resource configuration change for the worker nodes.
References
Upgrade or downgrade the resources of master nodes in an ACK dedicated cluster