Provision a GKE Cluster (Google Cloud) example won't work

Hello,

I’m having a hard time figuring out why the Provision a GKE Cluster (Google Cloud) tutorial won’t work. First I’ve got an error, that my MacBook M1 isn’t compatible with the tutorial provided version v3.52.0, so I went to the latest Google Cloud provider version 4.5.0., updated the terraform.tfvars like this:

project_id = "amiable-vent-337410"
region     = "europe-west3"

entered:

terraform init -upgrade
terraform apply -auto-approve

After that, I’ve got following error:

...
Changes to Outputs:
  + kubernetes_cluster_host = (known after apply)
  + kubernetes_cluster_name = "amiable-vent-337410-gke"
  + project_id              = "amiable-vent-337410"
  + region                  = "europe-west3"
google_compute_network.vpc: Creating...
google_compute_network.vpc: Still creating... [10s elapsed]
google_compute_network.vpc: Creation complete after 12s [id=projects/amiable-vent-337410/global/networks/amiable-vent-337410-vpc]
google_compute_subnetwork.subnet: Creating...
google_compute_subnetwork.subnet: Still creating... [10s elapsed]
google_compute_subnetwork.subnet: Still creating... [20s elapsed]
google_compute_subnetwork.subnet: Creation complete after 22s [id=projects/amiable-vent-337410/regions/europe-west3/subnetworks/amiable-vent-337410-subnet]
google_container_cluster.primary: Creating...
google_container_cluster.primary: Still creating... [10s elapsed]
google_container_cluster.primary: Still creating... [20s elapsed]
google_container_cluster.primary: Still creating... [30s elapsed]
google_container_cluster.primary: Still creating... [40s elapsed]
google_container_cluster.primary: Still creating... [50s elapsed]
google_container_cluster.primary: Still creating... [1m0s elapsed]
google_container_cluster.primary: Still creating... [1m10s elapsed]
google_container_cluster.primary: Still creating... [1m20s elapsed]
google_container_cluster.primary: Still creating... [1m30s elapsed]
google_container_cluster.primary: Still creating... [1m40s elapsed]
google_container_cluster.primary: Still creating... [1m50s elapsed]
google_container_cluster.primary: Still creating... [2m0s elapsed]
google_container_cluster.primary: Still creating... [2m10s elapsed]



google_container_cluster.primary: Still creating... [2m20s elapsed]
google_container_cluster.primary: Still creating... [2m30s elapsed]
google_container_cluster.primary: Still creating... [2m40s elapsed]
google_container_cluster.primary: Still creating... [2m50s elapsed]
google_container_cluster.primary: Still creating... [3m0s elapsed]
google_container_cluster.primary: Still creating... [3m10s elapsed]
google_container_cluster.primary: Still creating... [3m20s elapsed]
google_container_cluster.primary: Still creating... [3m30s elapsed]
google_container_cluster.primary: Still creating... [3m40s elapsed]
google_container_cluster.primary: Still creating... [3m50s elapsed]
google_container_cluster.primary: Still creating... [4m0s elapsed]
google_container_cluster.primary: Still creating... [4m10s elapsed]
google_container_cluster.primary: Still creating... [4m20s elapsed]
google_container_cluster.primary: Still creating... [4m30s elapsed]
google_container_cluster.primary: Still creating... [4m40s elapsed]
google_container_cluster.primary: Still creating... [4m50s elapsed]
google_container_cluster.primary: Still creating... [5m0s elapsed]
google_container_cluster.primary: Still creating... [5m10s elapsed]
google_container_cluster.primary: Still creating... [5m20s elapsed]
google_container_cluster.primary: Still creating... [5m30s elapsed]
google_container_cluster.primary: Still creating... [5m40s elapsed]
google_container_cluster.primary: Still creating... [5m50s elapsed]
google_container_cluster.primary: Creation complete after 5m58s [id=projects/amiable-vent-337410/locations/europe-west3/clusters/amiable-vent-337410-gke]
google_container_node_pool.primary_nodes: Creating...
google_container_node_pool.primary_nodes: Still creating... [10s elapsed]
google_container_node_pool.primary_nodes: Still creating... [20s elapsed]
google_container_node_pool.primary_nodes: Still creating... [30s elapsed]
google_container_node_pool.primary_nodes: Still creating... [40s elapsed]
google_container_node_pool.primary_nodes: Still creating... [50s elapsed]
╷
│ Error: NodePool amiable-vent-337410-gke-node-pool was created in the error state "RUNNING_WITH_ERROR"
│
│   with google_container_node_pool.primary_nodes,
│   on gke.tf line 32, in resource "google_container_node_pool" "primary_nodes":
│   32: resource "google_container_node_pool" "primary_nodes" {
│
╵

In the Google Cloud UI a cluster is created but sometime with and sometimes without nodes. Unfortunately I’m not able to understand what is going on or how to debug this case. Maybe someone can help me out with this.

Cheers

Hi Team , i am facing the same issue what mrszop
raised above. Do we have any solution for this?

Help is highly appreciated.

Thanks
Ricky