Istio
A service mesh that adds traffic management, telemetry, and security controls to service-to-service communication.
Why it exists.
It centralizes cross-cutting network behavior that would otherwise be repeated in every service.
Where it shines.
Kubernetes platforms with many services and advanced traffic or identity requirements.
Where not to use it.
Do not add a mesh before the team can operate its control plane and understand the added complexity.
What it is made of.
- Control plane
- Data plane
- Envoy proxies
- Policies
- Telemetry
How it works.
- A proxy intercepts service traffic
- Policies and routes are applied
- Identity secures the connection
- Telemetry reports behavior
Istiod configures the mesh.
Istiod discovers services, translates routing policies into proxy configuration, and issues workload certificates. Application requests travel through the data plane.
Architecture reference ↗Choose a deployment mode.
- Sidecar: an Envoy proxy alongside each workload handles routing, security, and telemetry.
- Ambient: per-node ztunnel proxies provide Layer 4 security; optional waypoint proxies add Layer 7 processing.
- Gateways: dedicated proxies manage traffic entering or leaving the mesh.
Follow one request.
- Service A sends a request through its Envoy proxy.
- The proxy selects a destination using configured routes.
- Proxies authenticate the connection with mutual TLS.
- Service B receives the request; proxies emit telemetry.
Declare the behavior.
- VirtualService: routes, weights, and timeouts.
- DestinationRule: service subsets and connection settings.
- PeerAuthentication: mutual TLS requirements.
- AuthorizationPolicy: access rules.
The walkthrough uses sidecars and Istio APIs.
Prepare a test cluster.
Use a supported Kubernetes cluster, kubectl access, and permission to install cluster resources. Check the current context before installing.
kubectl config current-context
kubectl get nodesGet istioctl and samples.
On Linux or macOS, download Istio, then enter the extracted istio-<version> directory. Use the release matching your cluster support requirements.
curl -L https://istio.io/downloadIstio | sh -
# Enter the extracted istio-<version> directory first.
export PATH="$PWD/bin:$PATH"
istioctl x precheckDownload and setup guide ↗Install the learning profile.
The demo profile is for evaluation. Review installation settings before using Istio in production.
istioctl install --set profile=demo -y
kubectl create namespace mesh-demo
kubectl label namespace mesh-demo istio-injection=enabled
kubectl get pods -n istio-systemInjection applies to newly created pods. Restart existing deployments in an enrolled namespace.
Explore Helm or ambient.
Helm supports declarative release management. Ambient uses its own installation profile and namespace enrollment; follow its separate guide.
Add Bookinfo to the mesh.
Run from the downloaded Istio directory after completing the sidecar installation tab.
kubectl apply -n mesh-demo -f samples/bookinfo/platform/kube/bookinfo.yaml
kubectl wait -n mesh-demo --for=condition=Ready pod --all --timeout=180s
kubectl get pods -n mesh-demo
istioctl proxy-statusEach application pod should include its istio-proxy container.
Try a gradual rollout.
Define version subsets, then split reviews traffic equally between v1 and v3.
kubectl apply -n mesh-demo -f samples/bookinfo/networking/destination-rule-all.yaml
kubectl apply -n mesh-demo -f samples/bookinfo/networking/virtual-service-all-v1.yaml
kubectl apply -n mesh-demo -f samples/bookinfo/networking/virtual-service-reviews-50-v3.yaml
istioctl analyze -n mesh-demoTraffic shifting walkthrough ↗Inspect the application.
kubectl port-forward -n mesh-demo svc/productpage 9080:9080Open http://localhost:9080/productpage and refresh to observe different reviews versions. Port forwarding is a local preview; use an ingress gateway for external access.
Require mutual TLS.
Save this as peer-authentication.yaml and apply it with kubectl apply -n mesh-demo -f peer-authentication.yaml after all workloads join the mesh.
apiVersion: security.istio.io/v1
kind: PeerAuthentication
metadata:
name: default
namespace: mesh-demo
spec:
mtls:
mode: STRICTAdd AuthorizationPolicy rules to restrict service access. Configure telemetry collectors to inspect latency and failures.
Authentication policy guide ↗