Deploy a configured GKE cluster

Let’s begin with the instantiation of a Kubernetes cluster with a managed version of Istio in Google Kubernetes Engine.

Kubernetes engine

Kubernetes Engine is Google’s managed service for running Kubernetes clusters. You can access it’s dedicated section through the main menu as shown:

Open GKE clusters page

Cluster creation

You may either create the cluster within the cloud console or using the command line. Since it takes a few minutes for the cluster to be up and running, we recommend you to go with the command line at first. While waiting for the job to be done, you can take a look at the UI and how to spawn a cluster from there.

Using the gcloud command line interface

To open the Google Cloud Shell, click on the button located in the console header as shown:

Open Google Cloud Shell

You will need your project ID to perform those commands. If running in Google Cloud Shell, it should be available in the DEVSHELL_PROJECT_ID environment variable. You can check that by running:

Λ\: $ echo "${DEVSHELL_PROJECT_ID}"

If it is not set , you can determine your project ID by listing all the projects you have access to with:

Λ\: $ gcloud projects list
# If you are running outside of Cloud Shell or had to determine the project ID yourself, change to next line accordingly
Λ\: $ export PROJECT_ID="${DEVSHELL_PROJECT_ID}"
Λ\: $ gcloud config set project "${PROJECT_ID}"
Λ\: $ gcloud beta container clusters create "istio-formation" \
      --zone "europe-north1-a" \
      --release-channel "rapid" \
      --machine-type "n1-standard-2" \
      --image-type "COS" \
      --num-nodes "5" \
      --enable-stackdriver-kubernetes \
      --enable-ip-alias \
      --addons HorizontalPodAutoscaling,HttpLoadBalancing,Istio \
      --istio-config auth=MTLS_PERMISSIVE
WARNING: Starting in 1.12, default node pools in new clusters will have their legacy Compute Engine instance metadata endpoints disabled by default. To create a cluster with legacy instance metadata endpoints disabled in the default node pool, run `clusters create` with the flag `--metadata disable-legacy-endpoints=true`.
WARNING: The Pod address range limits the maximum size of the cluster. Please refer to https://cloud.google.com/kubernetes-engine/docs/how-to/flexible-pod-cidr to learn how to optimize IP address allocation.
This will enable the autorepair feature for nodes. Please see https://cloud.google.com/kubernetes-engine/docs/node-auto-repair for more information on node autorepairs.
Creating cluster istio-formation in europe-north1-a... Cluster is being health-checked (master is healthy)...done.
Created [https://container.googleapis.com/v1beta1/projects/nlo-gcp-k8s-istio-5233238d/zones/europe-north1-a/clusters/istio-formation].
To inspect the contents of your cluster, go to: https://console.cloud.google.com/kubernetes/workload_/gcloud/europe-north1-a/istio-formation?project=nlo-gcp-k8s-istio-5233238d
kubeconfig entry generated for istio-formation.

NAME             LOCATION         MASTER_VERSION  MASTER_IP    MACHINE_TYPE   NODE_VERSION    NUM_NODES  STATUS
istio-formation  europe-north1-a  1.13.11-gke.14  35.228.3.95  n1-standard-2  1.13.11-gke.14  5          RUNNING

Within Google Cloud Console

If you created the cluster using the command line in the previous section, you may skip this chapter and go directly to the next one.
  1. Click on Create cluster

    Click on create cluster

  2. You will need:

    • A name: istio-formation

    • A location: europe-north1-a

    • A version of GKE: pick the rapid release channel

      Pick a name

  3. Before looking into the additional features, you need to set a few parameters in the Node pools section:

    • Set the Number of Nodes to 5

      Pick a size

    • Pick a 2 vCPus / 7.5 GB memory Machine Type

      Pick a machine type

  4. Once the additional features are opened, verify that you have the following Networking options enabled:

    • VPC Native (using alias IP)

    • HTTP load balancing

      Select the correct networking fields

  5. Finally, before clicking on Create, you will need:

    • To enable Kubernetes Engine Monitoring

    • To enable Istio in the Permissive mode

      Setup monitoring

The cluster creation may take a few moments. Once finished, you need to establish a connection. Click on the Connect button next to the cluster in the console.

Wait for cluster readyness then click on connect

  • Copy/paste the command inside Cloud Shell or in your terminal.

Connect to the cluster