Frequent Error when deploying Helm to GKE with Terraform

5/30/2020

Components

  1. GKE
  2. Helm v3
  3. Terraform

Note: The below error is raised, BUT IF i keep doing terraform apply/delete multiple times, it would somehow auto-resolve. I am making use of Google Cloud Console so there is no chacne of my Internet messing things up.

Error Type 1:

Error: Error reading ComputeNetwork "projects/foo/global/networks/bar-network": Get https://www.googleapis.com/compute/v1/projects/foo/global/networks/bar-network-e4l6-network?alt=json: dial tcp [1111:2222:4003:c03::5f]:443: connect: cannot assign requested address

Error Type 2:

Error reading Service Account "projects/foo/serviceAccounts/bar-sa@foo.iam.gserviceaccount.com": Get https://iam.googleapis.com/v1/projects/foo/serviceAccounts/example-cluster-sa@dravoka2.iam.gserviceaccount.com?alt=json&prettyPrint=false: dial tcp [1111:2222:4003:c04::5f]:443: connect: cannot assign requested address

Error Type 3:

Error: Error retrieving available container cluster versions: Get https://container.googleapis.com/v1beta1/projects/foo/locations/us-central1-c/serverConfig?alt=json&prettyPrint=false: dial tcp [1111:2222:4003:c03::5f]:443: connect: cannot assign requested address

Error Type 4:

Error reading instance group manager returned as an instance group URL: "googleapi: Error 404: The resource 'projects/foo/zones/us-central1-c/instanceGroupManagers/gke-bar-main-pool-8c2b8edd-grp' was not found, notFound"

I dont understand why it popsup randomly, and when I re-run same terraform apply/delete it magically works fine!

Any guidence would help.

-- Srinath Ganesh
kubernetes-helm
terraform

0 Answers