This demo shows you how to build a private multicluster service mesh solution, with Istio 1.5 and Service Mesh Hub for mesh Federation. This is achieved by using an Internal Load Balancer (ILB) to connect Istio workloads running in multi-region Private Google Kubernetes Engine (GKE) clusters.
In this demo, we will build the following architecture:
- A GCP project with billing enabled
- gcloud CLI
- kubectl
❯ export PROJECT_ID=<your-project-id>
my@localhost:~$./1-create-vpc-network.sh
my@localhost:~$./2-create-private-gke-clusters.sh
my@localhost:~$./3-create-cloudnat-for-private-gke-clusters.sh
4. For private GKE clusters, an automatically created firewall rule does not open port 15017. This is needed by the Pilot discovery validation webhook
my@localhost:~$./4-patch-gke-master-fw-rules.sh
my@localhost:~$./5-create-jump-host-vm.sh
❯ gcloud beta compute ssh --zone "europe-west2-a" "jump-host" --tunnel-through-iap --project $PROJECT_ID
my@jump-host:~$ sudo apt-get install -y git kubectl
❯ export PROJECT_ID=<your-project-id>
❯ git clone https://github.com/palimarium/multicluster-istio-smh-private-gke
my@jump-host:~/multicluster-istio-smh-private-gke$ gcloud auth login
my@jump-host:~$./6-install-istiod.sh
my@jump-host:~$./7-configure-service-mesh-hub.sh
my@jump-host:~$./8-configure-istio-example-service.sh
- Source env file
❯ source ./env.sh
- Delete the GCE VM:
❯ gcloud beta compute --project=$PROJECT_ID instances delete jump-host --zone=$ZONE_CLUSTER1
- Delete FW rule for iap access
❯ gcloud compute --project=$PROJECT_ID firewall-rules delete allow-jump-host-iap
- Delete the GKE Clusters:
❯ gcloud beta container clusters delete $NAME_CLUSTER1 --project $PROJECT_ID --zone $ZONE_CLUSTER1
❯ gcloud beta container clusters delete $NAME_CLUSTER2 --project $PROJECT_ID --zone $ZONE_CLUSTER2
- Delete CloudNAT
❯ gcloud compute routers nats delete nat-eu-west2 --router $REGION_CLUSTER1-nat-router --router-region $REGION_CLUSTER1
❯ gcloud compute routers nats delete nat-us-central1 --router $REGION_CLUSTER2-nat-router --router-region $REGION_CLUSTER2
- Delete CloudRouter
❯ gcloud compute routers delete $REGION_CLUSTER1-nat-router --region $REGION_CLUSTER1
❯ gcloud compute routers delete $REGION_CLUSTER2-nat-router --region $REGION_CLUSTER2
- Delete subnetworks
❯ gcloud compute networks subnets delete eu-ilb-subnet --region=$REGION_CLUSTER1
❯ gcloud compute networks subnets delete us-ilb-subnet --region=$REGION_CLUSTER2
- Delete custom VPC network
❯ gcloud compute networks delete cross-region-vpc