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
Verify you have the appropriate setup to delete standard clusters. For more information, see Manage access to standard clusters.
To get the permissions needed to delete a standard cluster, ask your Organization IAM Admin to grant you the Project IAM Admin (
project-iam-admin) and Standard Cluster Admin (standard-cluster-admin) roles. These roles are bound to your project namespace.
Delete a standard cluster and its resources
Complete the following steps to delete a shared cluster and its resources:
API
To delete a standard cluster, 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
To delete a standard cluster using Terraform, run:
terraform destroy -target kubernetes_manifest.cluster-createThe deletion can take up to 45 minutes.