Esamina il modo in cui GKE gestisce le seguenti risorse durante l'eliminazione del cluster:
GKE tenta di eliminare tutte le risorse del bilanciatore del carico. Tuttavia, per i servizi (type: LoadBalancer), ti consigliamo di
eliminarli prima di eliminare il cluster. Per i cluster con
centinaia di servizi o più, GKE potrebbe non eliminare tutte le risorse di bilanciamento del carico
all'eliminazione del cluster.
Se vuoi utilizzare Google Cloud CLI per questa attività,
installala e poi
inizializza
gcloud CLI. Se hai già installato gcloud CLI, scarica l'ultima versione
eseguendo gcloud components update.
Eliminazione di un cluster
gcloud
Per eliminare un cluster utilizzando Google Cloud CLI, esegui
questo comando:
gcloudcontainerclustersdeleteCLUSTER_NAME
Sostituisci CLUSTER_NAME con il nome del cluster
che vuoi eliminare.
Accanto al cluster che vuoi eliminare, fai clic su more_vertAzioni e poi su deleteElimina.
Quando ti viene chiesto di confermare, fai di nuovo clic su Elimina.
Per eliminare più cluster contemporaneamente, selezionali e fai clic su deleteElimina. Quando ti viene chiesto di confermare, fai di nuovo clic su Elimina.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-07-31 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)."]]