This repo is an example for using istio to host microservices across two clusters. It includes scripts to provision kubernetes, install istio, and an example app with exercises to test the multi cluster functionality.
awscli - Amazon Web Service CLI tool
gcloud - Google Cloud Platform CLI tool
kubectl - Kubernetes CLI tool
Google Cloud & AWS account
This exercise will simply pull the webpage that is hosted. Two copies of the application exists, on both clusters, 100% of traffic is directed towards cluster-1.
This exercise will simply pull the webpage that is hosted. Two copies of the applications exist on both clusters, 100% of traffic is directed towards cluster-2.
This exercise will transfer 50% of traffic into one cluster, and %50 of traffic into the other cluster.
This exercise will transfer 80% of traffic into on cluster and 20% of traffic into the other cluster.
This exercise will put start a pod that will put a load on the web app and simulate a burst of traffic.
This exercise will test whether https is being used for inter-service communication.
Create google cloud account
Navigate to Google Kubernetes engine and click on the blue enable billing button.
- Clone repo and move into directory
git clone https://github.com/rmeleromira/istio-multi-master
cd istio-multi-master
- Run provision script to create kubernetes clusters
./provision.sh
- Login to Google Cloud and AWS CLI tools
gloud init
awscli configure
- Run Istio install script
./install-istio.sh
- Install sock-shop
./install-app.sh
Creates two kubernetes clusters, one in AWS and one in GCP
Installs Istio 1.1 that supports multi master control planes into both kubernetes clusters
Installs example application for running exercises into both clusters
Gathers necessary variables to perform actions against the two clusters
Starts port forwards from k8s cluster to local environment
Stops port forwards from k8s cluster to local environment
Changes your kubernetes context to cluster-1
Changes your kubernetes context to cluster-2
Decomissions istio control plane
Remove test application
Decommissions the kubernetes clusters
-
microservice-demo (sock-shop) Rabbitmq could not connect to it's port because the connections get intercepted by istio sidecar and don't make it back. This is fixed by specifying the ports explicitly. Covered in microservices-demo.patch
-
One of the node ports (30001) used by sock-shop is also used by Istio, so we changed this port in sock-shop. Covered in microservices-demo.patch