This topic describes how to delete a Container Service for Kubernetes (ACK) cluster in the ACK console.

Notice
  • Before you delete a cluster, you must delete the workloads in the cluster, including Deployments, StatefulSets, Jobs, and CronJobs. You cannot delete the cluster if you do not delete the workloads. For more information about workloads, see Workloads.
  • After you delete an ACK cluster, the nodes that you manually added to the cluster are not automatically released.

Procedure

  1. Log on to the ACK console.
  2. In the left-side navigation pane of the ACK console, click Clusters.
  3. On the Clusters page, find the cluster that you want to delete and choose More > Delete in the Actions column.
  4. In the Delete Cluster dialog box, confirm that the cluster is the one that you want to delete and select the resources that you want to retain. Then, select I understand the above information and want to delete the specified cluster and click OK.

FAQ

Issue 1: 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 forcefully delete clusters. If your first attempt to delete a cluster fails, you can forcefully delete the cluster and the ROS stack. However, when you forcefully 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.
Cluster deletion failure
  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 stack.
    Delete a cluster
    Note If you select Retain Resources in the Delete Cluster dialog box, the resources that you select are not released. You must manually release these resources. For more information about how to identify resources that cannot be released, see Troubleshoot cluster deletion failures.

Issue 2: 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.
  2. In the left-side navigation pane of the ACK console, click Clusters.
  3. Find the cluster that you want to delete and choose More > Modify Deletion Protection Setting in the Actions column.
  4. In the Modify Deletion Protection Setting dialog box, turn off Cluster Deletion Protection.