19.06.2021 Views

148422597X Kubernetes Management Design Patterns [Vohra 2017-01-29] {E559F6BB}

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 3 ■ Kubernetes on Google Cloud Platform

Connecting to the Google Cloud Shell

To connect to the Google Cloud Shell, click the ➤ icon as shown in Figure 3-57. A message Welcome to

Cloud Shell and the command prompt for the Cloud Shell should be displayed.

Figure 3-57. Connecting to the Google Cloud Shell

Configuring kubectl

The kubectl command-line interface is used to manage the resources in a cluster. If more than one

container clusters exist, kubectl needs to be configured for the cluster to be managed. Using gcloud, which

is a command-line tool for Google Cloud Platform, run the following command to configure kubectl to a

specific cluster. The zone must be included in the command, with the –zone option:

gcloud container clusters get-credentials kube-cluster-1 --zone us-east1-d

The cluster endpoint and auth data are fetched, and a kubeconfig entry is generated for

kube-cluster-1 as shown in Figure 3-58.

Figure 3-58. Configuring kubectl for the cluster

80

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!