All Products
Search
Document Center

Container Service for Kubernetes:Delete a cluster

Last Updated:Jan 24, 2025

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 that you want to delete and select the resources that you want to retain. Read the information on the cluster deletion page and make sure that you understand the risks that may arise after you delete the cluster.

Rules for deleting ACK clusters and releasing nodes

When the system deletes an ACK cluster, the system 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 the nodes in the ECS console. When 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

  1. Log on to the ACK console. In the left-side navigation pane, click Clusters.

  2. On the Clusters page, choose More > Delete in the Actions column of the cluster that you want to delete.

  3. In the panel that appears, confirm the resources that you want to delete, such as ECS, Elastic Container Instance, and Alibaba Cloud Container Compute Service (ACS), and select the resources that you want to retain. Read the notes about resource deletion and billing on the page carefully, and complete the deletion operations as prompted.

Release resources

After you delete the cluster, check whether you need to clear the resources in sequence according to the resource notes in the console. After you confirm that the resources are no longer needed, manually clear the resources in the console or by calling API operations. Example:

FAQ

What do I do if I cannot delete an ACK cluster?

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 ACK cluster. For example, ROS cannot release a virtual private cloud (VPC) that contains a manually added vSwitch. Consequently, you cannot delete the cluster deployed in the VPC.

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 the resources.

When a cluster fails to be deleted, the following information is displayed, as shown in the figure.

集群删除失败

  1. Find the cluster that failed to be deleted and choose More > Delete in the Actions column.

  2. 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.

    删除集群

    Note

    If you select Retain Resources in the Delete Cluster dialog box, the resources that you select are retained. You must manually release the retained 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:

  1. Log on to the ACK console. In the left-side navigation pane, click Clusters.

  2. Choose More > Disable Deletion Protection in the Actions of the cluster.

  3. 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?

  1. Log on to the ACK console. In the left-side navigation pane, click Clusters.

  2. On the Clusters page, find the cluster that you want to manage and click its name. In the left-side navigation pane, choose Nodes > Node Pools.

  3. Click the name of the node pool whose configuration you want to view. Click the Overview tab. In the Node Configurations section, you can check whether the expected number of nodes is configured for the node pool. If the parameter is not configured, the Expected Number of Nodes displays -.期望..jpeg

Am I charged for a cluster in the Deleting or Deletion Failed state?

  • You are charged only a cloud resource fee for an ACK Basic cluster or ACK dedicated cluster. When you delete a cluster or a cluster fails to be deleted, we recommend that you check the status of the cloud resources used by the cluster. If the cloud resources are not released, the billing of the resources continues.

  • You are charged a cluster management fee and a cloud resource fee for an ACK Pro cluster. When a cluster is being deleted or fails to be deleted, the billing of cluster management stops but the billing of the cloud resources used by the cluster continues.

For more information, see Cluster lifecycle and Billing rules.

How is an ACK cluster in the Inactive or Unavailable state billed?

  • You are charged only a cloud resource fee for an ACK Basic cluster or ACK dedicated cluster. If an ACK Basic cluster or ACK dedicated cluster is in an abnormal state, the billing of the cloud resources used by the cluster continues.

  • You are charged a cluster management fee and a cloud resource fee for an ACK Pro cluster. When an ACK Pro cluster is in an abnormal state, ACK scales in the control plane of the cluster. After the control plane is scaled in, the billing of cluster management stops but the billing of the cloud resources used by the cluster continues.

For more information, see Cluster lifecycle and Billing rules.

When am I not charged a cluster management fee for an ACK cluster?

Cluster management: A cluster management fee is charged only for ACK Pro clusters. No cluster management fee is charged for ACK Basic clusters or ACK dedicated clusters.

When an ACK Pro cluster enters the following states, the billing of cluster management stops:

  • Initializing

  • Failed

  • Inactive

  • Unavailable

  • Deleting

  • Deletion Failed

  • Deleted. Clusters in this state are invisible in the console.

For more information, see Cluster lifecycle and Billing rules.