Remove one or more worker nodes from a cloud node pool in Container Service for Kubernetes (ACK). Node removal drains the node first—evicting pods to other nodes—and optionally releases the underlying ECS instance.
Node removal applies only to nodes in cloud node pools. It does not apply to worker nodes in self-managed Kubernetes clusters hosted in on-premises data centers.
What happens when you remove a node
When you remove a node, ACK performs the following steps automatically:
Drains the node by evicting all pods to other available nodes (if Drain Node is selected).
Removes the node from the cluster.
Releases the ECS instance and all attached data disks (if Release ECS Instance is selected).
If the node pool has the Expected Nodes parameter configured, the node pool automatically scales to maintain the expected number of ECS instances after removal.
After removal, you can re-add the node to the cluster. For more information, see Automatically or manually add nodes.
Prerequisites
Before you begin, ensure that you have:
An ACK One registered cluster with an external Kubernetes cluster deployed in a data center connected to it. For more information, see Create an ACK One registered cluster
A node pool with a custom script configured. For more information, see Create a node pool
Usage notes
Remove nodes only from the ACK console. Do not use
kubectl delete node.Do not release or remove ECS instances from the ECS console, the Auto Scaling console, or by calling API operations. When an ECS instance expires or is released outside ACK, the corresponding node stops running and is removed from the ACK console.
Renew subscription ECS instances before they expire.
Back up node data before removal. Pod migration during removal may cause service interruptions.
Before removing a node, check that other nodes in the cluster have enough resources to host the evicted pods.
Check the node affinity rules and scheduling policies of pods on the node to confirm they can be rescheduled to other nodes.
Drain Node option
Selecting Drain Node causes ACK to evict all pods from the node to other available nodes before removal. This prevents service interruptions.
Graceful shutdown timeout
The default graceful shutdown period (terminationGracePeriodSeconds) is 30 minutes. If a pod's configured value exceeds 30 minutes, the 30-minute default takes precedence. If a pod is not gracefully shut down within 30 minutes, draining stops and is marked as failed. ACK does not proceed with node removal. Retry the drain manually.
For pods with strict graceful shutdown requirements, drain the node manually before removing it:
Drain the node:
kubectl drain <your-region-name>.<node-id> --force --ignore-daemonsets --delete-local-dataExample:
kubectl drain cn-hangzhou.i-bp1asavedmte377c3****For all available flags, runkubectl drain --help.After all pods are evicted, proceed to remove the node in the ACK console with Drain Node cleared.
PodDisruptionBudget (PDB) behavior
During draining, ACK evicts pods according to the PodDisruptionBudget (PDB) configurations of those pods. Check and update PDB configurations based on your needs before draining.
Release ECS Instance option
Selecting Release ECS Instance permanently terminates the ECS instance and all attached data disks. Back up all data before proceeding. This action cannot be undone.
| Option | Behavior |
|---|---|
| Selected | The ECS instance and all attached data disks are permanently released. |
| Cleared | The ECS instance persists after node removal and continues to accrue charges. |
Billing method constraints
Only pay-as-you-go ECS instances and their attached data disks can be released during node removal.
Subscription ECS instances cannot be released during node removal. They are automatically released after the subscription expires. To release a subscription ECS instance before expiration, request a refund or change the billing method from subscription to pay-as-you-go and then release it.
Remove nodes from a node pool
Log on to the ACK console. In the left-side navigation pane, click Clusters.
On the Clusters page, 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. On the Nodes tab, select the nodes to remove and click Batch Remove in the lower part of the page.
Select or clear Drain Node and Release ECS Instance, review the usage notes, and follow the on-screen instructions to complete the removal.
What's next
Automatically or manually add nodes — re-add a node to the cluster after removal.