Istio Service Mesh Demo Stack
Service mesh with sidecar injection, traffic management, and observability.
Overview
Istiod is Istio's unified control plane that manages the entire service mesh infrastructure, handling configuration distribution, certificate management, and proxy lifecycle. This stack demonstrates core service mesh capabilities by combining Istiod with Envoy sidecars, Kiali for topology visualization, Jaeger for distributed tracing, and Prometheus/Grafana for metrics collection and monitoring. The configuration creates two sample microservices with dedicated Envoy proxy sidecars that intercept and manage all network traffic.
This demonstration environment showcases how Istio implements the sidecar proxy pattern, where each service communicates through its dedicated Envoy proxy rather than directly with other services. The Envoy proxies collect telemetry data, enforce security policies, and enable advanced traffic management features like circuit breaking, load balancing, and canary deployments. Jaeger captures distributed traces across service boundaries, while Kiali provides a visual representation of service dependencies and traffic flows.
Development teams adopting microservices architectures will find this stack valuable for understanding service mesh concepts before implementing Istio in Kubernetes clusters. Platform engineers can use this environment to prototype traffic management policies, test observability configurations, and demonstrate service mesh benefits to stakeholders. The stack serves as an educational tool that removes Kubernetes complexity while preserving core Istio functionality.
Key Features
- Istiod control plane managing Envoy proxy configurations and certificate distribution
- Sidecar proxy pattern with dedicated Envoy containers for each microservice
- Kiali service mesh topology visualization with traffic flow indicators
- Jaeger distributed tracing with OpenTelemetry protocol support
- Prometheus metrics collection from Envoy proxies and Istio components
- Grafana dashboards for service mesh observability and performance monitoring
- Protocol sniffing for automatic traffic detection and routing
- mTLS certificate management through Istiod's built-in certificate authority
Common Use Cases
- 1Learning service mesh concepts before deploying Istio in production Kubernetes clusters
- 2Prototyping traffic management policies and observability configurations
- 3Demonstrating microservices communication patterns to development teams
- 4Testing distributed tracing implementation across multiple service boundaries
- 5Evaluating service mesh overhead and performance impact on application latency
- 6Training platform engineers on Envoy proxy configuration and management
- 7Developing custom Grafana dashboards for service mesh monitoring
Prerequisites
- Docker Engine 20.10+ with Docker Compose v2 support
- 8GB RAM minimum (2GB for Jaeger, 1GB each for Prometheus/Grafana, 4GB for remaining components)
- Understanding of microservices architecture and inter-service communication
- Basic knowledge of load balancing, proxies, and network traffic management
- Familiarity with observability concepts including metrics, traces, and logs
- Available ports: 3000, 8081-8082, 9090, 15010-15014, 16686, 20001
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 # Simulated Istio control plane3 istiod: 4 image: istio/pilot:latest5 ports: 6 - "15010:15010"7 - "15012:15012"8 - "15014:15014"9 environment: 10 - PILOT_ENABLE_PROTOCOL_SNIFFING_FOR_OUTBOUND=true11 - PILOT_ENABLE_PROTOCOL_SNIFFING_FOR_INBOUND=true12 networks: 13 - istio_net1415 # Sample microservice with Envoy sidecar16 service-a: 17 image: nginx:alpine18 networks: 19 - istio_net2021 service-a-envoy: 22 image: envoyproxy/envoy:v1.28-latest23 volumes: 24 - ./envoy-service-a.yaml:/etc/envoy/envoy.yaml25 ports: 26 - "8081:8080"27 depends_on: 28 - service-a29 networks: 30 - istio_net3132 service-b: 33 image: nginx:alpine34 networks: 35 - istio_net3637 service-b-envoy: 38 image: envoyproxy/envoy:v1.28-latest39 volumes: 40 - ./envoy-service-b.yaml:/etc/envoy/envoy.yaml41 ports: 42 - "8082:8080"43 depends_on: 44 - service-b45 networks: 46 - istio_net4748 # Kiali service mesh visualization49 kiali: 50 image: quay.io/kiali/kiali:latest51 ports: 52 - "20001:20001"53 environment: 54 - AUTH_STRATEGY=anonymous55 networks: 56 - istio_net5758 # Distributed tracing59 jaeger: 60 image: jaegertracing/all-in-one:latest61 ports: 62 - "16686:16686"63 - "14268:14268"64 environment: 65 - COLLECTOR_OTLP_ENABLED=true66 networks: 67 - istio_net6869 prometheus: 70 image: prom/prometheus:latest71 ports: 72 - "9090:9090"73 volumes: 74 - ./prometheus.yml:/etc/prometheus/prometheus.yml75 - prometheus_data:/prometheus76 networks: 77 - istio_net7879 grafana: 80 image: grafana/grafana:latest81 ports: 82 - "3000:3000"83 environment: 84 - GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}85 volumes: 86 - grafana_data:/var/lib/grafana87 networks: 88 - istio_net8990volumes: 91 prometheus_data: 92 grafana_data: 9394networks: 95 istio_net: .env Template
.env
1# Istio Service Mesh Demo2GRAFANA_PASSWORD=secure_grafana_password34# Kiali at http://localhost:200015# Jaeger at http://localhost:166866# Services at http://localhost:8081, 8082Usage Notes
- 1Kiali mesh visualization at http://localhost:20001
- 2Jaeger tracing at http://localhost:16686
- 3Envoy sidecars handle traffic
- 4Demo setup - use Kubernetes for production
- 5Traffic management via Envoy configs
Individual Services(9 services)
Copy individual services to mix and match with your existing compose files.
istiod
istiod:
image: istio/pilot:latest
ports:
- "15010:15010"
- "15012:15012"
- "15014:15014"
environment:
- PILOT_ENABLE_PROTOCOL_SNIFFING_FOR_OUTBOUND=true
- PILOT_ENABLE_PROTOCOL_SNIFFING_FOR_INBOUND=true
networks:
- istio_net
service-a
service-a:
image: nginx:alpine
networks:
- istio_net
service-a-envoy
service-a-envoy:
image: envoyproxy/envoy:v1.28-latest
volumes:
- ./envoy-service-a.yaml:/etc/envoy/envoy.yaml
ports:
- "8081:8080"
depends_on:
- service-a
networks:
- istio_net
service-b
service-b:
image: nginx:alpine
networks:
- istio_net
service-b-envoy
service-b-envoy:
image: envoyproxy/envoy:v1.28-latest
volumes:
- ./envoy-service-b.yaml:/etc/envoy/envoy.yaml
ports:
- "8082:8080"
depends_on:
- service-b
networks:
- istio_net
kiali
kiali:
image: quay.io/kiali/kiali:latest
ports:
- "20001:20001"
environment:
- AUTH_STRATEGY=anonymous
networks:
- istio_net
jaeger
jaeger:
image: jaegertracing/all-in-one:latest
ports:
- "16686:16686"
- "14268:14268"
environment:
- COLLECTOR_OTLP_ENABLED=true
networks:
- istio_net
prometheus
prometheus:
image: prom/prometheus:latest
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus
networks:
- istio_net
grafana
grafana:
image: grafana/grafana:latest
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}
volumes:
- grafana_data:/var/lib/grafana
networks:
- istio_net
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 # Simulated Istio control plane5 istiod:6 image: istio/pilot:latest7 ports:8 - "15010:15010"9 - "15012:15012"10 - "15014:15014"11 environment:12 - PILOT_ENABLE_PROTOCOL_SNIFFING_FOR_OUTBOUND=true13 - PILOT_ENABLE_PROTOCOL_SNIFFING_FOR_INBOUND=true14 networks:15 - istio_net1617 # Sample microservice with Envoy sidecar18 service-a:19 image: nginx:alpine20 networks:21 - istio_net2223 service-a-envoy:24 image: envoyproxy/envoy:v1.28-latest25 volumes:26 - ./envoy-service-a.yaml:/etc/envoy/envoy.yaml27 ports:28 - "8081:8080"29 depends_on:30 - service-a31 networks:32 - istio_net3334 service-b:35 image: nginx:alpine36 networks:37 - istio_net3839 service-b-envoy:40 image: envoyproxy/envoy:v1.28-latest41 volumes:42 - ./envoy-service-b.yaml:/etc/envoy/envoy.yaml43 ports:44 - "8082:8080"45 depends_on:46 - service-b47 networks:48 - istio_net4950 # Kiali service mesh visualization51 kiali:52 image: quay.io/kiali/kiali:latest53 ports:54 - "20001:20001"55 environment:56 - AUTH_STRATEGY=anonymous57 networks:58 - istio_net5960 # Distributed tracing61 jaeger:62 image: jaegertracing/all-in-one:latest63 ports:64 - "16686:16686"65 - "14268:14268"66 environment:67 - COLLECTOR_OTLP_ENABLED=true68 networks:69 - istio_net7071 prometheus:72 image: prom/prometheus:latest73 ports:74 - "9090:9090"75 volumes:76 - ./prometheus.yml:/etc/prometheus/prometheus.yml77 - prometheus_data:/prometheus78 networks:79 - istio_net8081 grafana:82 image: grafana/grafana:latest83 ports:84 - "3000:3000"85 environment:86 - GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}87 volumes:88 - grafana_data:/var/lib/grafana89 networks:90 - istio_net9192volumes:93 prometheus_data:94 grafana_data:9596networks:97 istio_net:98EOF99100# 2. Create the .env file101cat > .env << 'EOF'102# Istio Service Mesh Demo103GRAFANA_PASSWORD=secure_grafana_password104105# Kiali at http://localhost:20001106# Jaeger at http://localhost:16686107# Services at http://localhost:8081, 8082108EOF109110# 3. Start the services111docker compose up -d112113# 4. View logs114docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/istio-service-mesh/run | bashTroubleshooting
- Kiali shows empty topology: Verify Envoy proxies are properly configured and generating telemetry data to Prometheus
- Jaeger traces not appearing: Check COLLECTOR_OTLP_ENABLED environment variable and ensure Envoy is configured to send traces to port 14268
- Envoy proxy startup failures: Validate envoy.yaml configuration files exist in working directory with correct cluster and listener definitions
- Istiod connection errors: Ensure pilot ports 15010-15014 are accessible and PILOT_ENABLE_PROTOCOL_SNIFFING variables are set
- Grafana dashboard shows no data: Verify Prometheus is scraping Envoy admin endpoints and Grafana data source points to prometheus:9090
- Service communication timeouts: Check Envoy cluster configurations match actual service names and ports in Docker network
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Components
istiodenvoykialijaegerprometheusgrafana
Tags
#istio#service-mesh#kubernetes#envoy#traffic-management
Category
DevOps & CI/CDAd Space
Shortcuts: C CopyF FavoriteD Download