This document explains how to delete a standard Kubernetes cluster from a Google Distributed Cloud (GDC) air-gapped zone. Deleting a standard cluster removes all its workloads, node pools, control plane nodes, and corresponding resources within the cluster. Since a standard cluster is confined to a single project, the deletion doesn't affect any other projects.
This document is for audiences such as application developers within the application operator group, who are responsible for managing container workloads within their organization. For more information, see Audiences for GDC air-gapped documentation.
Before you begin
To delete a standard cluster, ask your Project IAM Admin to grant you the
Standard Cluster Admin (standard-cluster-admin) role. This role is bound
to your project namespace. For more information, see
Manage access to standard clusters.
Delete a standard cluster and its resources
Complete the following steps to delete a shared cluster and its resources:
API
Verify that all persistent volume claims (PVC) are deleted from your standard cluster. For more information, see Delete persistent storage.
Remove the
Clustercustom resource from the GDC zone:kubectl delete clusters.cluster.gdc.goog/STANDARD_CLUSTER_NAME \ --namespace PROJECT_NAME \ --kubeconfig MANAGEMENT_API_SERVERThe deletion can take up to 45 minutes. If you want the deletion process to run in the background, append the
--wait=falseparameter to the command.Replace the following:
STANDARD_CLUSTER_NAME: the name of the cluster to delete.PROJECT_NAME: the name of the project that manages the cluster.MANAGEMENT_API_SERVER: the zonal API server's kubeconfig path where the cluster is hosted. If you have not yet generated a kubeconfig file for the management API server in your targeted zone, see Sign in.
Terraform
Verify that all persistent volume claims (PVC) are deleted from your standard cluster. For more information, see Delete persistent storage.
Remove the resource using Terraform:
terraform destroy -target kubernetes_manifest.cluster-createThe deletion can take up to 45 minutes.