Deleting Google Cloud Platform Kubernetes cluster with missing resource

1/28/2019

Good day,

Accidentally removed network peering, which was done with creating Kubernetes cluster. Now problem is that I want to remove that cluster, but getting error message that this network peering not exists anymore and cluster deletion fails on that.

statusMessage: u'Google Compute Engine: There is no peering (gke-ds1f2ds2fdsfdsf5dsf5ds4f-241d-22b7-peer) for the network (GLOBAL:global/PROJECT:121212122121/NETWORK:default).' targetLink: u'https://container.googleapis.com/v1/projects/599591769467/zones/region/clusters/cluster-name' zone: region'>] finished with error: Google Compute Engine: There is no peering (gke-ds1f2ds2fdsfdsf5dsf5ds4f-241d-22b7-peer) for the network (GLOBAL:global/PROJECT:599591769467/NETWORK:default)

Is there any possible way to force google cloud platform object deletion, even if it have corrupted dependencies?

-- Deniss Gubanov
google-cloud-platform
google-kubernetes-engine
kubernetes

1 Answer

1/28/2019

The answer is already in the comments but I add this one to help someone who may have the same issue.

It seems that the gke cluster need it's network to be in the same states as before to be able to get deleted.

Lucky for us, it's not linked to a peering resource by id or self link and so you just need to recreate the peering with the exact same name to resolve the issue.

-- night-gold
Source: StackOverflow