All Products
Search
Document Center

Container Service for Kubernetes:Delete ACK clusters

Last Updated:Sep 18, 2023

You can delete Container Service for Kubernetes (ACK) clusters in the ACK console. This topic describes the rules and steps for deleting ACK clusters and provides answers to some frequently asked questions about deleting ACK clusters.

Table of contents

Important

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.

  • If a node pool is not configured with the expected number of nodes, all nodes are released except those 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 has the Expected Nodes parameter configured?

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 Delete Cluster dialog box, select the resources that you want to release or retain, select I understand the above information and want to delete the specified cluster, and then click OK.

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.

集群删除失败
  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 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:

  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 has the Expected Nodes parameter configured?

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

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

  3. 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 -.期望..jpeg