Kubernetes Cluster
The first step is to create a cluster to work with. We will create a Kubernetes cluster using Google Kubernetes Engine.
Everything on GCP is operated with API (even from the console!). Enable the Google Cloud Platform APIs so that you can create a Kubernetes cluster.
gcloud services enable \
compute.googleapis.com \
container.googleapis.com \
containerregistry.googleapis.com
Set default region and zones.
gcloud config set compute/zone us-east1-d
gcloud config set compute/region us-east1
Create a Kubernetes cluster in Google Cloud Platform is very easy! Use Kubernetes Engine to create a cluster:
gcloud container clusters create guestbook \
--num-nodes 4 \
--scopes cloud-platform
This will take a few minutes to run. Behind the scenes, it will create Google Compute Engine instances, and configure each instance as a Kubernetes node. These instances don’t include the Kubernetes control plan nodes. In Google Kubernetes Engine, the Kubernetes control plane is a managed service so that you don’t have to worry about it!
Last updated
Was this helpful?