Delete a cluster

更新时间:
复制 MD 格式

You can delete clusters that you no longer need from the Container Service for Kubernetes (ACK) console. On the deletion page, you can review the resources to be deleted and select which ones to retain. Read the on-screen notices carefully to ensure you understand the risks before proceeding.

Cluster deletion and node release rules

When you delete a cluster, ACK releases the nodes by sequentially deleting their node pools. The following rules apply to node pools in the cluster:

  • If a node pool is configured with a desired number of nodes: All pay-as-you-go nodes in the node pool are released. Subscription nodes are not released. To release subscription nodes, log on to the ECS console, convert the subscription nodes to pay-as-you-go nodes, and then release the nodes in the ECS console. After a node is released, its system disk is also released.

  • If a node pool is not configured with a desired number of nodes: Subscription nodes and any nodes that were manually or automatically added to the node pool are not released. All other nodes are released.

For more information, see How do I determine if a node pool has a desired number of nodes configured?

Procedure

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

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

  3. In the panel that appears, carefully review the resources that will be automatically deleted, such as ECS, ECI, and ACS resources. Select any resources you want to retain, read the notes about resource deletion and billing, and then follow the on-screen instructions to delete the cluster.

Clean up resources

After a cluster is deleted, ACK automatically cleans up some of the associated resources. However, certain resources, such as subscription nodes and storage volumes, are not automatically released with the cluster. To avoid unnecessary charges, you must manually delete any remaining resources. You can log on to the Resource Management console to view all resources in your account.

The following table lists some of these resources.

Cloud resource

Deletion guide

ECS nodes (subscription)

First, convert the subscription instances to pay-as-you-go instances (Console/OpenAPI), and then release the instances (Console/OpenAPI).

VPC

Delete a VPC and a vSwitch

vSwitch

security group

Delete a security group

NAT gateway

Delete a NAT gateway

EIP

Release an EIP

CLB (subscription)

Release a CLB instance

NLB

Release an NLB instance

ALB

Release an ALB instance

Cloud Native API Gateway (APIG)

Release a Cloud Native API Gateway instance

MSE Cloud Native Gateway

Release an MSE Cloud Native Gateway

cloud disk (used as a PV)

Release a cloud disk

NAS (used as a PV)

Delete a NAS file system

OSS bucket (used as a PV)

Delete a bucket

CPFS for AI (used as a PV)

Delete a CPFS for AI file system

CPFS General-purpose (used as a PV)

Delete a CPFS General-purpose file system

SLS project

Delete an SLS project

Prometheus

Delete a Prometheus instance

FAQ

What if cluster deletion fails?

If cluster deletion fails, its status changes to delete_failed.

Deletion can fail for the following reasons:

  • Abnormal resource dependencies

    When you delete an ACK cluster, ACK releases the resources that you selected for deletion. ACK checks for resource dependencies during this process. For example, if a resource to be deleted has dependencies that were not created by the cluster, the deletion may fail. You can click View in the Cluster Status column to see the cause of the failure. After you resolve the issue, try deleting the cluster again.

    For example, if a NAT gateway automatically created by the ACK cluster contains SNAT or DNAT entries that were not created by the cluster, the deletion may fail.

    You can choose to retain the NAT gateway during the deletion and then manually release the NAT resources after the cluster is deleted. Alternatively, follow the on-screen instructions to manually remove the blocking SNAT or DNAT entries, and then try to delete the cluster again.

  • If the cluster deletion fails for other reasons, submit a ticket.

How do I disable cluster deletion protection?

If a cluster has deletion protection enabled, a prompt requires you to disable the protection before you can delete the cluster. You can follow these steps to disable cluster deletion protection:

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

  2. On the Actions page, find the cluster and choose More > Disable Deletion Protection in the Actions column, and then follow the on-screen instructions.

How do I check the desired node count of a node pool?

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

  2. On the Clusters page, click the name of your cluster. In the left navigation pane, click Nodes > Node Pools.

  3. Click the name of the target node pool and then click the Basic Information tab. In the Scaling Configurations section, check whether a desired number of nodes is configured.

    If so, the corresponding number is displayed.

    The section also shows the values for Expected Nodes and Actual Nodes.

Are clusters billed in the deleting or delete_failed state?

  • ACK Basic clusters and ACK dedicated clusters are billed only for their associated cloud resources, regardless of the cluster's state.

  • ACK Pro clusters incur both cluster management fees and charges for associated cloud resources. When a cluster is in the deleting or delete_failed state, you are no longer charged the cluster management fee, but you will continue to be billed for any associated cloud resources.

For more information, see cluster lifecycle and billing overview.

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

  • You are charged only a cloud resource fee for an ACK managed 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 managed 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.

States with no management fees

A cluster management fee is charged only for ACK managed Pro clusters. No cluster management fee is charged for ACK managed clusters or ACK dedicated clusters.

When an ACK managed Pro cluster is in one of the following states, cluster management fees are no longer charged:

  • Initializing

  • Failed

  • Inactive

  • Unavailable

  • Deleting

  • Delete_failed

  • Deleted (The cluster is no longer visible in this state.)

For more information, see Cluster lifecycle and Billing overview.

Why isn't the associated CLB instance automatically released when an ACK cluster is deleted?

An associated subscription CLB instance is not automatically released when you delete an ACK cluster. This is because subscription instances must first be converted to pay-as-you-go before they can be deleted.

See CLB Billing FAQ for instructions on how to convert a subscription CLB instance to a pay-as-you-go instance, and then release the CLB instance.

For more information about deleting clusters, see Delete a cluster.