Setup Kubernetes Cluster
In this lab, you will create a new Kubernetes cluster, which we’ll use for the rest of the lab.
Use either Google Cloud Shell or your terminal with Google Cloud SDK installed (the SDK comes with
kubectl, so you do not need to install it manually)
You already created a GCP project and set the
You already cloned the directory :
Run the following commands to configure
gcloud, this will save you from typing the parameters
region in every
gcloud config set compute/zone europe-west1-b gcloud config set compute/region europe-west1 gcloud config set project $PROJECT_ID
Create a cluster:
$ gcloud beta container clusters create "istio-workshop" kubeconfig entry generated for istio-workshop. NAME LOCATION MASTER_VERSION MASTER_IP MACHINE_TYPE NODE_VERSION NUM_NODES STATUS istio-workshop europe-west1-b 1.13.7-gke.8 188.8.131.52 n1-standard-1 1.13.7-gke.8 3 RUNNING
⏳ Wait until the cluster is created. It may takes up to 5 minues.
Let’s check the connexion to our newly created cluster:
1- Review the cluster’s informations:
$ gcloud container clusters list NAME LOCATION MASTER_VERSION MASTER_IP MACHINE_TYPE NODE_VERSION NUM_NODES STATUS istio-cluster europe-west1-b 1.9.7-gke.6 184.108.40.206 n1-standard-1 1.9.7-gke.6 3 RUNNING
2- Download the cluster’s credentials, they will be written to
kubectl's configuration file (
$ gcloud container clusters get-credentials istio-workshop Fetching cluster endpoint and auth data. kubeconfig entry generated for istio-workshop.
3- Check the connexion with the cluster:
$ kubectl cluster-info Kubernetes master is running at https://220.127.116.11 GLBCDefaultBackend is running at https://18.104.22.168/api/v1/namespaces/kube-system/services/default-http-backend:http/proxy Heapster is running at https://22.214.171.124/api/v1/namespaces/kube-system/services/heapster/proxy KubeDNS is running at https://126.96.36.199/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy Metrics-server is running at https://188.8.131.52/api/v1/namespaces/kube-system/services/https:metrics-server:/proxy To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
Now you are ready to install Istio!