No1Lives4Ever
No1Lives4Ever

Reputation: 6883

Deleting Kubernetes cluster from GCP failed

I made a small setup of Kubernetes cluster. After few hours I tried to delete it. But, it impossible to delete the cloud resource.

I tried from the GCP UI:

enter image description here

and from with gcloud:

$ gcloud container clusters delete nat-test-cluster
The following clusters will be deleted.
 - [nat-test-cluster] in [europe-west3-c]

Do you want to continue (Y/n)?  Y

ERROR: (gcloud.container.clusters.delete) Some requests did not succeed:
 - args: [u'ResponseError: code=404, message=Not found: projects/proj/zones/europe-west3-c/clusters/nat-test-cluster.\nCould not find [nat-test-cluster] in [europe-west3-c].\nDid you mean [nat-test-cluster] in [us-central1-a]?']
   exit_code: 1
   message: ResponseError: code=404, message=Not found: projects/dotnet-core-cluster/zones/europe-west3-c/clusters/nat-test-cluster.
Could not find [nat-test-cluster] in [europe-west3-c].
Did you mean [nat-test-cluster] in [us-central1-a]?

Those machines are looks like still working, but in accessible. I dont know what else to try. Contact gcp billing support to stop the billing but they said I dont have technial support plan and they can't help me. So annoying that I need to pay for support for problems not in my control.

How to delete this cluster? What to do?

Upvotes: 2

Views: 3211

Answers (2)

JPJPJP
JPJPJP

Reputation: 1

I was in the same situation as you. But I just managed to delete the cluster.

  1. Delete all Services.
  2. Delete all Workloads.
  3. Delete all Applications.
  4. Go to the Clusters page.
  5. Push the ... icon next to the cluster you want to delete.
  6. Select "Delete"
  7. It would say again, there is a repairing undergoing. But you can select "Delete" again in the modal.

Voila!

Upvotes: 0

Kolban
Kolban

Reputation: 15266

If we look at the documentation for deleting a cluster found here:

https://cloud.google.com/sdk/gcloud/reference/container/clusters/delete

We find that it has an optional zone parameter. When you create (or delete) a cluster, you MUST supply a zone. If you do NOT supply a zone, your default zone (as believed by the gcloud command) will be used. In your output, we seem to see that your gcloud command thinks its DEFAULT zone is europe-west3-c while it appears that the zone in which the cluster lives is us-central1-a. I believe the solution will be to add the --zone us-central1-a parameter to your gcloud command.

Upvotes: 5

Related Questions