May 2018
Intermediate to advanced
554 pages
13h 51m
English
To enable multi-zone cluster, add --additional-zones $zone2, $zone3, … into the command when you create the cluster.
Just like AWS, GCP has service quota limits as well. You could use gcloud compute project-info describe –project $PROJECT_NAME to check the quota and request an increase from the GCP console if needed.
Let's launch a two-nodes cluster per zone first:
// launch a multi-zone cluster with 2 nodes per zone.# gcloud container clusters create my-k8s-cluster --cluster-version 1.9.2-gke.1 --machine-type f1-micro --num-nodes 2 --network k8s-network --tags private --scopes=storage-rw,compute-ro --zone us-central1-a --additional-zones us-central1-b,us-central1-cCreating cluster my-k8s-cluster...done.Created [https://container.googleapis.com/v1/projects/kubernetes-cookbook/zones/us-central1-a/clusters/my-k8s-cluster]. ...
Read now
Unlock full access