Creating a cluster on GKE to host the containers

The container engine cluster runs on top of GCE. For this recipe, we'll create a two-node cluster which will be internally managed by Kubernetes:

  1. We'll create the cluster using the following command:
$ gcloud container clusters create mysite-cluster
--scopes "cloud-platform" --num-nodes 2 --zone us-east1-c

The gcloud command automatically generates a kubeconfig entry that enables us to use kubectl on the cluster:

  1. Using kubectl, verify that you have access to the created cluster:
$ kubectl get nodes

The gcloud command is used to manage resources on Google Cloud Project and kubectl is used to manage resources on the Container Engine/Kubernetes cluster.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.107.110