Remove one or more worker nodes from a node pool or directly from your Container Service for Kubernetes (ACK) cluster when you no longer need them. Schedule node removals during off-peak hours to reduce the risk of service disruption.
Use cases
-
Replace an ECS instance: Remove an existing Elastic Compute Service (ECS) instance from a node pool and add a newly purchased one.
-
Move a node between node pools: Remove the node from its current node pool, then add it to the target node pool.
-
Change instance configuration or billing method: Remove the node, make the changes in the ECS console, then re-add the node to the node pool.
-
Fix node exceptions: Remove the node from the cluster and re-add it to trigger reinitialization. Back up system disk data before performing this operation, as it resets the node by replacing the system disk.
-
Manage free nodes: Clusters created before the node pool feature was released may contain free nodes. Remove free nodes from the cluster or move them into a node pool for centralized management.
-
Control scale-in targets: When scaling in a node pool with manual or auto scale-out enabled, remove specific ECS instances to reduce costs.
Prerequisites
Before you begin, make sure that:
-
Other nodes in the cluster have enough resources to host the pods that will be evicted from the node you remove.
-
The node affinity rules and scheduling policies of the pods on that node allow rescheduling to other nodes.
How it works
When you remove a node in the ACK console, the system runs the following sequence:
-
Drain (if Drain Node is selected): ACK evicts pods from the node to other available nodes, respecting any PodDisruptionBudget (PDB) configurations. The system waits up to 30 minutes for pods to shut down gracefully. If a pod's
terminationGracePeriodSecondsis set to a value longer than 30 minutes, the 30-minute limit takes precedence. If a pod is not terminated within 30 minutes, the drain fails and subsequent removal steps are not performed — you must retry manually. -
Remove: The node is removed from the cluster or node pool.
-
Release (if Release ECS Instance is selected): The ECS instance and its attached data disks are released.
If the node pool has Expected Nodes configured, it automatically scales to restore the expected instance count after removal.
Usage notes
-
Remove nodes from the ACK console. Do not use
kubectl delete node, the ECS console, the Auto Scaling console, or API operations to remove or release ECS instances. -
Renew subscription ECS instances before they expire. When an instance is released or expires, the corresponding node stops running and is removed from the ACK console.
-
If a node pool has Expected Nodes configured, the node pool automatically scales out to maintain the expected count after a node is removed.
Remove nodes from a node pool
When you remove a node, pods on that node are migrated to other nodes, which may cause temporary service interruptions. Back up node data before proceeding, and perform removals during off-peak hours.
-
Log on to the ACK console. In the left-side navigation pane, click ACK consoleClusters.
-
On the Clusters page, find and click the name of the cluster you want to manage. In the left-side navigation pane, choose Nodes > Node Pools.
-
Click the name of the node pool that contains the node. On the Nodes tab, select the nodes to remove and click Batch Remove at the bottom of the page.
-
Configure the removal options:
-
Drain Node: If selected, ACK evicts pods to other nodes before removal. Clear this option only if you have already manually drained the node.
If your pods require a graceful shutdown period longer than 30 minutes, drain the node manually first, then clear Drain Node before proceeding:
kubectl drain <nodeName> [options]Placeholder
Description
Example
<nodeName>Node name in
<region-id>.<instance-id>formatcn-hangzhou.i-i-bp1asavedmte377c3****[options]Optional drain flags
--force --ignore-daemonsets --delete-local-dataRun
kubectl drain --helpfor the full list of options. -
Release ECS Instance: If selected, the ECS instance and its attached data disks are released on removal. Only pay-as-you-go instances can be released this way. If cleared, the instance continues to be billed after the node is removed. Subscription ECS instances are automatically released after the subscription expires. To release a subscription ECS instance before expiration, request a refund before the end of the subscription duration. You can also change the billing method from subscription to pay-as-you-go and then release the instance.
-
-
Read the on-screen instructions and complete the removal.
-
Verify that the nodes are removed:
kubectl get nodesThe removed nodes no longer appear in the output.
Remove nodes from a cluster
When you remove a node, pods on that node are migrated to other nodes, which may cause temporary service interruptions. Back up node data before proceeding, and perform removals during off-peak hours.
-
Log on to the ACK console. In the left-side navigation pane, click Clusters.
-
On the Clusters page, find and click the name of the cluster you want to manage. In the left-side navigation pane, choose Nodes > Nodes.
-
Select the nodes to remove and click Batch Remove at the bottom of the page.
-
Configure the removal options:
-
Drain Node: If selected, ACK evicts pods to other nodes before removal. Clear this option only if you have already manually drained the node.
If your pods require a graceful shutdown period longer than 30 minutes, drain the node manually first, then clear Drain Node before proceeding:
kubectl drain <nodeName> [options]Placeholder
Description
Example
<nodeName>Node name in
<region-id>.<instance-id>formatcn-hangzhou.i-i-bp1asavedmte377c3****[options]Optional drain flags
--force --ignore-daemonsets --delete-local-dataRun
kubectl drain --helpfor the full list of options. -
Release ECS Instance: If selected, the ECS instance and its attached data disks are released on removal. Only pay-as-you-go instances can be released this way. If cleared, the instance continues to be billed after the node is removed. Subscription ECS instances are automatically released after the subscription expires. To release a subscription ECS instance before expiration, request a refund before the end of the subscription duration. You can also change the billing method from subscription to pay-as-you-go and then release the instance.
-
-
Read the on-screen instructions and complete the removal.
-
Verify that the nodes are removed:
kubectl get nodesThe removed nodes no longer appear in the output.
After removing a node from a cluster, you can re-add it. See Add existing ECS instances to an ACK cluster.
Troubleshooting
Node removal fails
Node removal typically fails because a pod exceeded the 30-minute graceful shutdown period, or a PodDisruptionBudget (PDB) blocked eviction.
Drain the node manually, then remove it with Drain Node cleared:
kubectl drain <nodeName> --force --ignore-daemonsets --delete-local-data
Replace <nodeName> with the node name in <region-id>.<instance-id> format — for example, cn-hangzhou.i-i-bp1asavedmte377c3****.
If PDB configurations are blocking the drain, review and update the PDB settings to match your actual disruption tolerance before retrying.
What's next
-
Add nodes back to the cluster: Add existing ECS instances to an ACK cluster or automatically add nodes
-
Add free nodes to a node pool: Add free nodes to a node pool
-
Scale a node pool by adjusting Expected Nodes: Manually scale a node pool
-
Remove nodes using API operations: RemoveNodePoolNodes and DeleteClusterNodes
-
Reset a node's system disk: Re-initialize a system disk