<p>I am trying to set up kubernetes cluster on GCP with terraform.Terraform script has VPC (firewall, subnet default route)and kubernetes.</p>

<p>Randomly i am getting issue  "NetworkUnavailable" inside cluster node, but same terraform script work fine in next run.</p>

<p>So there is no any issue with terraform. I dont know how to resolve this issue. If i running script 10 times then provision get fail 4 to 5 times.</p>

<p>Error waiting for creating GKE NodePool: All cluster resources were brought up, but the cluster API is reporting that: only 3 nodes out of 4 have registered; cluster may be unhealthy.</p>

<p>Please help me.</p>

<p><a href="https://i.stack.imgur.com/yEOip.png" rel="nofollow noreferrer">enter image description here</a></p>

<p>Thanks
Shrwan</p>

S kumar
<p>This is a <a href="https://github.com/terraform-providers/terraform-provider-google/issues/898" rel="nofollow noreferrer">fairly common issue when using terraform</a> to create GKE clusters. If you create the cluster manually through the GKE API, you won't have the same error.</p>

<p>Note that when creating a GKE cluster, you only need to create the cluster. It is not necessary to create firewall rules or routes as the GKE API will create them during cluster creation. </p>

<p>Most of the time, this error message means that the nodes are unable to communicate with the master node, this is usually linked to an issue with the network config.</p>

<p>If you are creating a zonal cluster, you might have <a href="https://github.com/terraform-providers/terraform-provider-google/issues/4562" rel="nofollow noreferrer">this issue</a>. I'll add <a href="https://github.com/terraform-providers/terraform-provider-google/issues/2022" rel="nofollow noreferrer">this 3rd one</a> as well, which has a 3rd root cause for the same issue.</p>
