123DevOps··7 min read

What is Istio? Sidecar or ambient service mesh, mTLS, and canaries on Kubernetes

Learn what Istio is, the difference between sidecar mode and ambient mode (ztunnel and waypoint), how it delivers automatic mTLS, and how to run a canary with VirtualService and DestinationRule.

Kubernetes

With ten microservices talking to each other, every team ends up reimplementing the same things: retries, timeouts, TLS between services, latency metrics, rules about who can call whom. Each language does it differently, and nobody has a single view of the traffic. A service mesh takes that responsibility out of the code and puts it into the infrastructure, and Istio is the best known of them.

What Istio is

Istio is an open source service mesh that adds security, observability, and traffic management to applications without changing their code. The project was born in 2017 as a partnership between Google, IBM, and Lyft, and it uses Envoy as the data plane proxy.

At the CNCF, Istio joined in September 2022 as an incubating project and became graduated in July 2023. As of November 2026 it is still graduated (check the project page). The license is Apache 2.0, and the latest version I saw on the GitHub releases page was 1.32.0.

What problem it solves

Istio tackles three fronts at once:

  • Security: encryption and identity between services with automatic mTLS, with certificates issued and rotated by the mesh itself, plus authorization policies (who can call whom).
  • Traffic: routing by weight, header, or path, retries, timeouts, circuit breaking, and fault injection, all declared in YAML.
  • Observability: metrics, access logs, and traces for every call, generated by the proxy, without instrumenting the application.

The real gain is uniformity: the same rules apply to a service in Go, another in Java, and another in Python.

How it works

Istio has a control plane, istiod, which reads the cluster configuration (Services, Endpoints, and Istio’s CRDs), issues certificates, and pushes configuration to the proxies over xDS. The data plane is the proxies that actually carry the traffic. And here is the big architecture decision: Istio has two data plane modes.

Sidecar mode

This is the classic model. Each pod gets an extra Envoy container (the sidecar), injected automatically when the namespace has the istio-injection=enabled label. All inbound and outbound pod traffic goes through that Envoy, which handles mTLS and L7 processing (HTTP, gRPC).

Ambient mode

This is the sidecar-less mode, which reached GA in version 1.24. It splits the work into two layers:

  • ztunnel: one proxy per node, purpose-built for L4. It handles mTLS, identity, L4 authorization, and TCP telemetry. It does not parse HTTP. Traffic between ztunnels travels in a tunnel called HBONE (based on HTTP CONNECT).
  • waypoint: an optional Envoy, usually one per namespace, deployed as a Gateway resource with gatewayClassName: istio-waypoint. It only enters the path when you need L7 features such as weighted routing, retries, or authorization by HTTP path.

A namespace joins ambient mode with the istio.io/dataplane-mode=ambient label, without restarting pods.

Sidecar Ambient (ztunnel) Ambient + waypoint
Where the proxy runs One Envoy per pod One ztunnel per node ztunnel + Envoy per namespace
mTLS Yes Yes Yes
L7 (HTTP) features Yes No Yes
Pods must restart to join Yes No No
Resource cost Higher (CPU/memory in every pod) Low Medium, only where L7 is needed
Recommended routing API VirtualService / DestinationRule — HTTPRoute (Gateway API)

Both modes can coexist in the same mesh, which lets you migrate gradually.

Hands-on example

The most direct installation uses istioctl. The commands below follow the official documentation (istioctl was not run in my test environment):

# installs Istio with the ambient profile (istiod, CNI, and ztunnel)
istioctl install --set profile=ambient --skip-confirmation

# option 1: put the namespace in ambient mode (L4 + mTLS)
kubectl label namespace shop istio.io/dataplane-mode=ambient

# create a waypoint for L7 features and attach it to the namespace
istioctl waypoint apply -n shop --enroll-namespace

# option 2 (sidecar mode): automatic injection; restart the pods afterwards
kubectl label namespace shop istio-injection=enabled
kubectl rollout restart deployment -n shop

Canary with DestinationRule and VirtualService

In sidecar mode, the classic canary uses two resources. The DestinationRule defines subsets based on pod labels; the VirtualService splits traffic between them. The networking.istio.io/v1 apiVersion is the one used in the current documentation:

apiVersion: networking.istio.io/v1
kind: DestinationRule
metadata:
  name: checkout
  namespace: shop
spec:
  host: checkout.shop.svc.cluster.local
  trafficPolicy:
    outlierDetection:
      consecutive5xxErrors: 5
      interval: 30s
      baseEjectionTime: 60s
  subsets:
  - name: v1
    labels:
      version: v1
  - name: v2
    labels:
      version: v2
---
apiVersion: networking.istio.io/v1
kind: VirtualService
metadata:
  name: checkout
  namespace: shop
spec:
  hosts:
  - checkout.shop.svc.cluster.local
  http:
  - route:
    - destination:
        host: checkout.shop.svc.cluster.local
        subset: v1
      weight: 90
    - destination:
        host: checkout.shop.svc.cluster.local
        subset: v2
      weight: 10
    timeout: 3s
    retries:
      attempts: 2
      perTryTimeout: 1s
      retryOn: 5xx,connect-failure

Both Deployments (version: v1 and version: v2) sit behind the same checkout Service. To advance the canary, you just change the weights: 90/10, 50/50, 0/100. The strategy itself is covered in scaling and updating applications.

In ambient mode, the Istio documentation classifies VirtualService support on waypoints as alpha and recommends the Gateway API HTTPRoute, with one Service per version:

apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: checkout
  namespace: shop
spec:
  parentRefs:
  - group: ""
    kind: Service
    name: checkout
    port: 8080
  rules:
  - backendRefs:
    - name: checkout-v1
      port: 8080
      weight: 90
    - name: checkout-v2
      port: 8080
      weight: 10

Don’t mix VirtualService and HTTPRoute for the same workload.

Mandatory mTLS

By default, Istio uses PERMISSIVE mode: it accepts traffic with and without mTLS, which makes migration easier. Once all clients are in the mesh, close the door:

apiVersion: security.istio.io/v1
kind: PeerAuthentication
metadata:
  name: default
  namespace: istio-system   # in the root namespace it applies to the whole mesh
spec:
  mtls:
    mode: STRICT

Each workload’s identity follows the SPIFFE format (spiffe://<trust-domain>/ns/<namespace>/sa/<service-account>); the concept is covered in SPIFFE and SPIRE.

When to use it (and when not to)

Use Istio when:

  • you have many services and need mTLS and authorization between them for security or compliance reasons;
  • you want standardized canaries, retries, and timeouts without touching the code;
  • you need uniform telemetry for every service-to-service call.

Avoid it (or postpone it) when:

  • there are few services: an Ingress, NetworkPolicy, and good libraries solve it with fewer moving parts;
  • the team hasn’t mastered the basics of Kubernetes networking yet: the mesh adds one more layer to debug;
  • the only need is an ingress gateway: an API gateway or a Gateway API controller is enough.

If you decide to adopt it, start with ambient mode using only ztunnel (mTLS), and add waypoints only where L7 is actually needed.

Alternatives

Project Proxy Highlight
Istio Envoy (sidecar/waypoint) and ztunnel Most features, sidecar or ambient
Linkerd Its own Rust proxy Simplicity and low footprint
Cilium Service Mesh eBPF + per-node Envoy Integrated with the Cilium CNI
Kuma Envoy Multi-zone, Kubernetes and VMs

Summary

  • Istio is a CNCF graduated service mesh (as of November 2026), with the istiod control plane
  • Sidecar mode: one Envoy per pod, istio-injection=enabled label
  • Ambient mode (GA since 1.24): per-node ztunnel for L4 and mTLS, optional waypoint for L7
  • Sidecar canary: DestinationRule with subsets and VirtualService with weights (networking.istio.io/v1)
  • In ambient, prefer the Gateway API HTTPRoute for L7 routing
  • Move from PERMISSIVE to STRICT with PeerAuthentication once everyone is in the mesh
  • Only a few services? You may not need a service mesh yet

A service mesh doesn’t fix a messy architecture: it just makes its traffic visible, secure, and controllable.

Get updates on new posts and stay in the loop!