This project deploys the Istio Bookinfo application in three different modes (no mesh, sidecar mesh, ambient mesh) onto a local Kubernetes kind cluster. It also includes a monitoring stack (Prometheus, Grafana, Kiali) and a K6 performance testing setup.
The demo showcases:
- Istio service mesh capabilities with sidecars and the newer ambient mode.
- Accessing applications via an Istio-managed Kubernetes Gateway.
- Monitoring the mesh and applications using Kiali.
- Visualizing metrics with Prometheus and Grafana.
- Running automated performance tests with K6 and generating reports.
- Docker Desktop: With Kubernetes and kind enabled.
- helm: The Kubernetes package manager. Installation Guide
- kubectl: The Kubernetes command-line tool. Installation Guide
- k6: Modern load testing tool. Installation Guide
- (Optional but Recommended)
istioctl: The Istio command-line tool Installation Guide
-
Make the Script Executable:
chmod +x service-mesh-setup.sh
-
Run the Setup Script: This will deploy MetalLB, the monitoring stack, Istio, Kiali, Bookinfo applications, and configure gateways.
./service-mesh-setup.sh
The script will output access information at the end.
-
Configure
/etc/hosts: The setup script will output theEXTERNAL-IPof the Istio Ingress Gateway. You need to add entries to your/etc/hostsfile (orC:\Windows\System32\drivers\etc\hostson Windows) to map the hostnames to this IP. For example, if the gateway IP is172.18.255.3:172.18.255.3 no-mesh.bookinfo.local 172.18.255.3 sidecar.bookinfo.local 172.18.255.3 ambient.bookinfo.local(Docker Desktop often forwards LoadBalancer IPs to
127.0.0.1, so you might be able to use127.0.0.1instead of the MetalLB IP in your/etc/hostsfile.) -
Bookinfo Applications:
- No Mesh:
http://no-mesh.bookinfo.local/productpage - Sidecar:
http://sidecar.bookinfo.local/productpage - Ambient:
http://ambient.bookinfo.local/productpage
- No Mesh:
-
Monitoring Tools: Run
kubectl get svc -A | grep LoadBalancerto find theEXTERNAL-IPandPORT(S)for:- Kiali: Usually in
istio-systemorkiali-operatornamespace. Access viahttp://<KIALI_IP>:<KIALI_PORT>(e.g.,http://localhost:20001if Docker Desktop forwards it). - Grafana: In
monitoringnamespace. Access viahttp://<GRAFANA_IP>:3000(e.g.,http://localhost:3000). Admin password isprom-operator. - Prometheus: In
monitoringnamespace. Access viahttp://<PROMETHEUS_IP>:9090(e.g.,http://localhost:9090).
(In case of Kiali, you might want to port-forward the svc to access the dashboard: kubectl port-forward -n istio-system svc/kiali 20001:20001.)
- Kiali: Usually in
Run the test Script:
./k6-execution.sh-
Test Execution: The script executes
test.js, which contains scenarios forno-mesh,sidecar, andambientenvironments. Each scenario runs for 2 minutes with 10 Virtual Users (VUs). -
HTML Report: A single HTML report named
k6-report.htmlwill be generated in the directory where you ran the script. This report contains metrics for all test scenarios.
Access Grafana: Open Grafana using its LoadBalancer IP/port (e.g., http://localhost:3000). Log in with admin / prom-operator.
To remove all resources created by this demo:
./service-mesh-setup.sh cleanup