Revisa cómo GKE controla los siguientes recursos durante la eliminación del clúster:
GKE intenta borrar todos los recursos del balanceador de cargas. Sin embargo, en el caso de los servicios (type: LoadBalancer), te recomendamos que los borres antes de borrar el clúster. En el caso de los clústeres con cientos de servicios o más, es posible que GKE no borre todos los recursos del balanceador de cargas cuando se borre el clúster.
Si deseas usar Google Cloud CLI para esta tarea, instala y, luego, inicializa gcloud CLI. Si ya instalaste gcloud CLI, ejecuta gcloud components update para obtener la versión más reciente.
Borra un clúster
gcloud
Para borrar un clúster con la CLI de Google Cloud, ejecuta el siguiente comando:
gcloudcontainerclustersdeleteCLUSTER_NAME
Reemplaza CLUSTER_NAME por el nombre del clúster que deseas borrar.
Junto al clúster que deseas borrar, haz clic en more_vertAcciones y, luego, en deleteBorrar.
Cuando se te solicite confirmación, haz clic en Borrar de nuevo.
Para borrar varios clústeres al mismo tiempo, selecciónalos y haz clic en deleteBorrar. Cuando se te solicite confirmación, haz clic en Borrar de nuevo.
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2024-11-22 (UTC)"],[],[],null,["# Deleting a cluster\n\n[Autopilot](/kubernetes-engine/docs/concepts/autopilot-overview) [Standard](/kubernetes-engine/docs/concepts/choose-cluster-mode)\n\n*** ** * ** ***\n\nThis page explains how to delete a Google Kubernetes Engine (GKE) cluster.\n\nWhen you delete a cluster, GKE deletes the following resources:\n\n- The control plane resources\n- All of the node instances in the cluster\n- Any Pods that are running on those instances\n- Any firewalls and routes created by GKE at the time of cluster creation\n- Data stored in host `hostPath` and `emptyDir` volumes\n- If [registered to a fleet](/kubernetes-engine/fleet-management/docs/register/gke#register_your_cluster), the cluster's [fleet membership](/kubernetes-engine/fleet-management/docs/fleet-creation#about_fleet_membership), unless the cluster was registered using a legacy command.\n\nReview how GKE handles the following resources during cluster\ndeletion:\n\n- GKE attempts to delete all [load balancer](/compute/docs/load-balancing) resources. However, for Services (`type: LoadBalancer`), we recommend that you delete the Services before deleting your cluster. For clusters with hundreds of Services or more, GKE might not delete all load balancer resources upon cluster deletion.\n- GKE retains [persistent disk](/compute/docs/disks#pdspecs) volumes during cluster deletion. See how to [manage persistent storage during\n cluster\n deletion](/kubernetes-engine/docs/concepts/persistent-volumes#persistent-storage-cluster-deletion).\n\nBefore you begin\n----------------\n\nBefore you start, make sure that you have performed the following tasks:\n\n- Enable the Google Kubernetes Engine API.\n[Enable Google Kubernetes Engine API](https://console.cloud.google.com/flows/enableapi?apiid=container.googleapis.com)\n- If you want to use the Google Cloud CLI for this task, [install](/sdk/docs/install) and then [initialize](/sdk/docs/initializing) the gcloud CLI. If you previously installed the gcloud CLI, get the latest version by running `gcloud components update`. **Note:** For existing gcloud CLI installations, make sure to set the `compute/region` [property](/sdk/docs/properties#setting_properties). If you use primarily zonal clusters, set the `compute/zone` instead. By setting a default location, you can avoid errors in the gcloud CLI like the following: `One of [--zone, --region] must be supplied: Please specify location`. You might need to specify the location in certain commands if the location of your cluster differs from the default that you set.\n\nDeleting a cluster\n------------------\n\n### gcloud\n\nTo delete a cluster using the Google Cloud CLI, run\nthe following command: \n\n gcloud container clusters delete \u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e\n\nReplace \u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e with the name of the cluster\nthat you want to delete.\n\nFor more information, refer to the\n[`gcloud container clusters delete`](/sdk/gcloud/reference/container/clusters/delete)\ndocumentation.\n\n### Console\n\nTo delete a cluster using the Google Cloud console, perform the following\nsteps:\n\n1. Go to the **Google Kubernetes Engine** page in the Google Cloud console.\n\n [Go to Google Kubernetes Engine](https://console.cloud.google.com/kubernetes/list)\n2. Next to the cluster you want to delete, click *more_vert* **Actions** , then click *delete* **Delete**.\n\n3. When prompted to confirm, click **Delete** again.\n\nTo delete multiple clusters at once, select them and click *delete*\n**Delete** . When prompted to confirm, click **Delete** again.\n\nWhat's next\n-----------\n\n- [Learn more about clusters](/kubernetes-engine/docs/concepts/cluster-architecture)."]]