You can delete Container Service for Kubernetes (ACK) clusters in the ACK console. The cluster deletion page displays the existing resources in the cluster that you want to delete. You can check the resources to be deleted and select the resources that you want to retain. Read the information on the page and make sure that you understand the risks that may arise after the cluster is deleted.
Before you delete an ACK cluster, you need to manually delete the workloads in the cluster, including Deployments, StatefulSets, Jobs, and CronJobs. Otherwise, you may fail to delete the cluster. For more information about Kubernetes workloads, see Workloads.
Rules for deleting ACK clusters and releasing nodes
When the system deletes an ACK cluster, it deletes the node pools in the cluster in sequence to release all cluster nodes. For node pools in an ACK cluster:
If a node pool is configured with the expected number of nodes, only pay-as-you-go nodes in the node pool are released. Subscription nodes in the node pool are not released. To release subscription nodes, log on to the Elastic Compute Service (ECS) console, convert the subscription nodes to pay-as-you-go nodes, and then release them in the ECS console. After a node is released, the system disk of the node is also released.
If a node pool is not configured with the expected number of nodes, all nodes are released except the nodes that are manually or automatically added and subscription nodes.
For more information about how to check whether a node pool is configured with the expected number of nodes, see How do I check whether a node pool is configured with the expected number of nodes?
Procedure
Log on to the ACK console. In the left-side navigation pane, click Clusters.
On the Clusters page, choose in the Actions column of the cluster that you want to delete.
In the Delete Cluster dialog box, select the resources that you want to retain or release, select I understand the above information and want to delete the specified cluster, and then click OK.
ImportantThe Delete Cluster dialog box provides information about the deletion and billing rules of the associated cloud resources when you delete a cluster. Read the information before you delete the cluster.
FAQ
What do I do if an ACK cluster cannot be deleted?
If you do not release the resources that are manually added to the resources created by Resource Orchestration Service (ROS), ROS cannot delete the resources it created when you delete the cluster. For example, ROS cannot release a virtual private cloud (VPC) that contains a manually added vSwitch. Consequently, the cluster deployed in the VPC cannot be deleted.
ACK allows you to forcibly delete clusters. If your first attempt to delete a cluster fails, you can forcefully delete the cluster and the ROS resource stack. However, when you forcibly delete a cluster, the resources that are created by ROS and the manually added resources are not released. You must manually release these resources.
When a cluster fails to be deleted, the following information is displayed, as shown in the figure.
Find the cluster that failed to be deleted and choose
in the Actions column.In the dialog box that appears, you can view the resources that failed to be deleted. Click OK to delete the cluster and ROS resource stack.
NoteIf you select Retain Resources in the Delete Cluster dialog box, the resources that you select are retained. You must manually release these resources.
How do I disable deletion protection for an ACK cluster?
If deletion protection is enabled for an ACK cluster, the system prompts you to disable deletion protection when you delete the cluster. Perform the following steps to disable deletion protection:
Log on to the ACK console. In the left-side navigation pane, click Clusters.
Choose in the Actions of the cluster.
In the Modify Deletion Protection Setting dialog box, turn off Cluster Deletion Protection.
How do I check whether a node pool is configured with the expected number of nodes?
Log on to the ACK console. In the left-side navigation pane, click Clusters.
On the Clusters page, find the cluster that you want to manage and click its name. In the left-side navigation pane, choose .
Click the name of the node pool that you want to view. Click the Overview tab. In the Node Configurations section, you can check whether the expected number of nodes is configured. If the parameter is not configured, the Expected Number of Nodes displays -.
Am I charged for a cluster that is being deleted or fails to be deleted?
If a cluster is in the Deleting state or fails to be deleted, you are not charged a cluster management fee for the cluster. However, you are charged for cloud resources in the cluster. For more information about the lifecycle of clusters, see Cluster lifecycle. For more information about the billing of ACK managed clusters and ACK dedicated clusters, see Billing.
How is an ACK cluster in the Inactive or Unavailable state billed?
When your cluster is in the Inactive or Unavailable state, you are still charged for cluster management and cloud resources. For more information about the billing, see Billing.
When am I not charged a cluster management fee for a cluster?
You are not charged a cluster management fee for a cluster that is in the Initializing, Create Failed, Deleting, Delete Failed, or Deleted state. However, you are charged for the cloud resources used by the cluster. You cannot view a deleted cluster. For more information about the lifecycle of clusters, see Cluster lifecycle. For more information about the billing of ACK managed clusters and ACK dedicated clusters, see Billing.