Take the following steps to enable the Kubernetes Engine API:
- Visit the Kubernetes Engine page in the Google Cloud Platform Console.
- Create or select a project.
- Wait for the API and related services to be enabled. This can take several minutes.
- Make sure that billing is enabled for your project.
Once the project creation completed then open Cloudshell, which have some preinstalled packages like docker, git, gcloud, and perform below operation.
- Install Kubectl into the cloudshell
gcloud components install kubectl
- Setup defaults config for gcloud
gcloud config set project [PROJECT_ID]
gcloud config set compute/zone us-central1-b
- To create a cluster for this demo, run the following command - let's call the demo cluster (It will take 3-4min to create the cluster)
gcloud container clusters create istio-demo \
--machine-type=n1-standard-1 \
--num-nodes=4 \
--no-enable-legacy-authorization
- Once you have the required cluster, grant cluster admin permissions to the current user. You need these permissions to create the necessary role based access control (RBAC) rules for Istio
kubectl create clusterrolebinding cluster-admin-binding \
--clusterrole=cluster-admin \
--user="$(gcloud config get-value core/account)"