This page describes how to delete an Google Distributed Cloud user
cluster. User cluster deletion will unregister the cluster and delete the
workloads, node pools, control plane nodes and the corresponding resources, like
VMs and F5 partitions.
Overview
How you delete a user cluster depends on how the cluster was created. If the
cluster was created in the Google Cloud console, you can use either the
Google Cloud console or gkectl to delete it. If the cluster was created with
gkectl, use gkectl to delete it. If you are unsure how the cluster was
created, follow the steps below to delete the cluster using the
Google Cloud console.
Select the Google Cloud project that the user cluster is in.
In the list of clusters, click the cluster that you want to delete.
In the Details panel, if the Type is vm Anthos (VMware) do the
following steps to delete the cluster using the Google Cloud console:
In the Details panel, click More details.
Near the top of the window, click delete
Delete.
When prompted to confirm, click Delete again.
If the Type is external, this indicates that the cluster was
created using gkectl. In this case, use gkectl to delete the cluster.
gkectl
If the cluster was created using gkectl, and it wasn't configured to be
managed by the Anthos On-Prem API, run the following command to delete
the cluster:
If deleting the user cluster using the Google Cloud console or
gkectl delete cluster fails halfway to delete the cluster, you can run
gkectl with the --force flag to ignore the halfway error and continue the
deletion.
ADMIN_CLUSTER_KUBECONFIG is the path to the admin
cluster's kubeconfig file.
CLUSTER_NAME is the name of the user cluster you want
to delete.
Clean up resources
After a forced deletion, some F5 or vSphere resources might be left over due to
ignoring the halfway errors. The following sections explain how to clean up
these leftover resources.
Clean up a user cluster's VMs in vSphere
To verify that the user cluster's VMs are deleted, perform the following steps:
From the vSphere Web Client's left-hand Navigator menu, click the
Hosts and Clusters menu.
Find the resource pool for your admin cluster. This is the value of
vCenter.resourcePool
in your admin cluster configuration file.
Under the resource pool, locate VMs prefixed with the name of your user
cluster. These are the control-plane nodes for your user cluster. There will
be one or three of these depending on whether your user cluster has a
high-availability control plane.
Find the resource pool for your user cluster. This is the value of
vCenter.resourcePool
in your user cluster configuration file. If your user cluster configuration
file does not specify a resource pool, it is inherited from the admin cluster.
Under the resource pool, locate VMs prefixed with the name of a node pool in
your user cluster. These are the worker nodes in your user cluster.
For each control-plane node and each worker node:
From the vSphere Web Client, right-click the VM and select
Power > Power Off.
After the VM is powered off, right-click the VM and select
Delete from Disk.
Clean up a user cluster's F5 partition
If there are any entries remaining in the user cluster's partition, perform the
following steps:
From the F5 BIG-IP console, in the top-right corner of the console, switch to
the user cluster partition you want to clean up.
Select Local Traffic > Virtual Servers > Virtual Server List.
In the Virtual Servers menu, remove all the virtual IPs.
Select Pools, then delete all the pools.
Select Nodes, then delete all the nodes.
After you have finished
After gkectl finishes deleting the user cluster, you can delete the user
cluster's kubeconfig.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eUser clusters can be deleted using either the Google Cloud console or \u003ccode\u003egkectl\u003c/code\u003e, depending on how the cluster was initially created.\u003c/p\u003e\n"],["\u003cp\u003eDeleting a user cluster removes all associated workloads, node pools, control plane nodes, and corresponding resources like VMs and F5 partitions.\u003c/p\u003e\n"],["\u003cp\u003eIf a user cluster deletion fails midway, \u003ccode\u003egkectl\u003c/code\u003e can be used with the \u003ccode\u003e--force\u003c/code\u003e flag to bypass errors and complete the deletion.\u003c/p\u003e\n"],["\u003cp\u003eAfter a forced deletion, manual cleanup might be necessary to remove leftover vSphere VMs or F5 partition resources.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003egkectl delete cluster\u003c/code\u003e command, followed by the --kubeconfig and --cluster parameters, is needed to delete a user cluster, where the parameters are the admin's cluster kubeconfig file path and the cluster name respectively.\u003c/p\u003e\n"]]],[],null,["# Deleting a user cluster\n\n\u003cbr /\u003e\n\nThis page describes how to delete an Google Distributed Cloud user\ncluster. User cluster deletion will unregister the cluster and delete the\nworkloads, node pools, control plane nodes and the corresponding resources, like\nVMs and F5 partitions.\n\nOverview\n--------\n\nHow you delete a user cluster depends on how the cluster was created. If the\ncluster was created in the Google Cloud console, you can use either the\nGoogle Cloud console or `gkectl` to delete it. If the cluster was created with\n`gkectl`, use `gkectl` to delete it. If you are unsure how the cluster was\ncreated, follow the steps below to delete the cluster using the\nGoogle Cloud console.\n\nDelete a user cluster\n---------------------\n\n### Google Cloud console\n\nIf the user cluster was created in the Google Cloud console, or it has been\n[configured to be managed by the Anthos On-Prem API](/anthos/clusters/docs/on-prem/1.12/how-to/enroll-user-cluster),\ndo the following steps to delete the cluster:\n\n1. In the Google Cloud console, go to the GKE Enterprise clusters page.\n\n [Go to the GKE Enterprise clusters page](https://console.cloud.google.com/anthos/clusters)\n2. Select the Google Cloud project that the user cluster is in.\n\n3. In the list of clusters, click the cluster that you want to delete.\n\n4. In the **Details** panel, if the **Type** is **vm Anthos (VMware)** do the\n following steps to delete the cluster using the Google Cloud console:\n\n 1. In the **Details** panel, click **More details**.\n\n 2. Near the top of the window, click delete **Delete**.\n\n 3. When prompted to confirm, click **Delete** again.\n\n If the **Type** is **external** , this indicates that the cluster was\n created using `gkectl`. In this case, use `gkectl` to delete the cluster.\n\n### gkectl\n\nIf the cluster was created using `gkectl`, and it wasn't configured to be\nmanaged by the Anthos On-Prem API, run the following command to delete\nthe cluster: \n\n gkectl delete cluster \\\n --kubeconfig \u003cvar translate=\"no\"\u003eADMIN_CLUSTER_KUBECONFIG\u003c/var\u003e \\\n --cluster \u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e \n\nwhere\n\n- \u003cvar translate=\"no\"\u003eADMIN_CLUSTER_KUBECONFIG\u003c/var\u003e is the path to the admin cluster's kubeconfig file.\n- \u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e is the name of the user cluster you want to delete.\n\nIf you are using the Seesaw bundled load balancer,\n[delete the load balancer](/anthos/clusters/docs/on-prem/1.12/how-to/bundled-load-balance#deleting_a_load_balancer).\n\nForce delete a user cluster\n---------------------------\n\nIf deleting the user cluster using the Google Cloud console or\n`gkectl delete cluster` fails halfway to delete the cluster, you can run\n`gkectl` with the `--force` flag to ignore the halfway error and continue the\ndeletion.\n\nTo force delete a cluster: \n\n gkectl delete cluster \\\n --kubeconfig \u003cvar translate=\"no\"\u003eADMIN_CLUSTER_KUBECONFIG\u003c/var\u003e \\\n --cluster \u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e \\\n --force\n\n- \u003cvar translate=\"no\"\u003eADMIN_CLUSTER_KUBECONFIG\u003c/var\u003e is the path to the admin cluster's kubeconfig file.\n- \u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e is the name of the user cluster you want to delete.\n\n### Clean up resources\n\nAfter a forced deletion, some F5 or vSphere resources might be left over due to\nignoring the halfway errors. The following sections explain how to clean up\nthese leftover resources.\n\n#### Clean up a user cluster's VMs in vSphere\n\nTo verify that the user cluster's VMs are deleted, perform the following steps:\n\n1. From the vSphere Web Client's left-hand **Navigator** menu, click the\n **Hosts and Clusters** menu.\n\n2. Find the resource pool for your admin cluster. This is the value of\n [`vCenter.resourcePool`](/anthos/clusters/docs/on-prem/1.12/how-to/admin-cluster-configuration-file#vcenter-resourcepool-field)\n in your admin cluster configuration file.\n\n3. Under the resource pool, locate VMs prefixed with the name of your user\n cluster. These are the control-plane nodes for your user cluster. There will\n be one or three of these depending on whether your user cluster has a\n high-availability control plane.\n\n4. Find the resource pool for your user cluster. This is the value of\n [`vCenter.resourcePool`](/anthos/clusters/docs/on-prem/1.12/how-to/user-cluster-configuration-file#vcenter-resourcepool-field)\n in your user cluster configuration file. If your user cluster configuration\n file does not specify a resource pool, it is inherited from the admin cluster.\n\n5. Under the resource pool, locate VMs prefixed with the name of a node pool in\n your user cluster. These are the worker nodes in your user cluster.\n\n6. For each control-plane node and each worker node:\n\n 1. From the vSphere Web Client, right-click the VM and select\n **Power** \\\u003e **Power Off**.\n\n 2. After the VM is powered off, right-click the VM and select\n **Delete from Disk**.\n\n#### Clean up a user cluster's F5 partition\n\nIf there are any entries remaining in the user cluster's partition, perform the\nfollowing steps:\n\n1. From the F5 BIG-IP console, in the top-right corner of the console, switch to the user cluster partition you want to clean up.\n2. Select **Local Traffic** \\\u003e **Virtual Servers** \\\u003e **Virtual Server List**.\n3. In the **Virtual Servers** menu, remove all the virtual IPs.\n4. Select **Pools**, then delete all the pools.\n5. Select **Nodes**, then delete all the nodes.\n\nAfter you have finished\n-----------------------\n\nAfter `gkectl` finishes deleting the user cluster, you can delete the user\ncluster's kubeconfig."]]