Terraform: GKE Cluster with Nodes in different zones

Simply add the following line

resource "google_container_cluster" "primary" {
  name = "cluster"
  location = "us-central1"
  initial_node_count       = "3"

in order to create a regional cluster. The above will bring up 9 nodes with each zone (f a b) containing 3 nodes. If you only want 1 node per zone, then just change initial_node_count to 1.

More info here at Argument reference.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top