Delete a node
You can delete a node from the LHC console when you no longer need it.
Starting from August 15, 2020, new clusters created on Alibaba Cloud are ACK managed clusters by default.
Prerequisites
A cluster is created or a cluster is imported.
Deleting a node automatically evicts pods and causes pod migration. This may affect your services. We recommend that you perform this operation during off-peak hours.
This operation involves potential risks. We recommend that you back up your data before you proceed.
Procedure
In the navigation pane on the left, click Cluster Management > Cluster Details to open the cluster list page.
Click the name of the target cluster to open its details page, and then click the Nodes tab.
Select the checkbox of the node that you want to delete, and then choose More > Delete.
In the pop-up window, select a deletion method and click OK.
Automatically drain the node (drain): This option moves the pods from the selected node to other nodes. Before you select this option, make sure that other nodes in the cluster have sufficient resources. Alternatively, you can run the
kubectl drain node-namecommand to move the pods from the node.NoteThe `node-name` must be in the
your-region-name.node-idformat. For example,cn-hangzhou.i-xxx. In this format,your-region-namespecifies the region where your cluster is deployed and `node-id` specifies the ID of the ECS instance that corresponds to the node that you want to remove.Also release ECS instance: This option deletes the node and releases the corresponding ECS instance.
This option releases only pay-as-you-go ECS instances.
NoteIf pods exist on the node, you must also select Automatically drain the node to migrate the pods to other nodes. Make sure that the cluster has sufficient resources for the migration.
This release operation applies only to pay-as-you-go instances. You are still charged for subscription instances that are not released.
Removing a node is an asynchronous operation. You can check the removal status on the node list page.
A subscription ECS instance is automatically released after its billing period expires.
Before your ECS instance expires, you can also perform the following operations:
Request a refund to release the instance ahead of schedule. For more information, see Refund rules and procedures.
Convert the billing method to pay-as-you-go and then release the instance. For more information, see Convert a subscription instance to a pay-as-you-go instance.
If you do not select Also release ECS instance, you are still charged for the corresponding ECS instance.
NoteIf pods exist on the node, you must also select Automatically drain the node to migrate the pods to other nodes. Make sure that the cluster has sufficient resources for the migration.
This release operation applies only to pay-as-you-go instances. You are still charged for subscription instances that are not released.
Removing a node is an asynchronous operation. You can check the removal status on the node list page.