Skip to content
Tutorials Center
My learning

Topics

Lesson 32 of 36 ยท Operations and Upgrades

Istio Ambient Mode: ztunnel, Waypoint Proxies and Trade-offs

Understand sidecarless Istio: how ambient mode splits the data plane into a per-node ztunnel for L4 mTLS and optional waypoint proxies for L7, how to enable it, and when to choose it.

The sidecar model has a price: one extra container in every pod. It costs memory and CPU for each replica, complicates startup and upgrades (proxies change only when pods restart) and can surprise applications. Ambient mode is Istio's sidecarless data plane. It keeps the same control plane and the same APIs but moves the proxying out of the application pod, so adding an application to the mesh needs no restart and no injection.

The product cannot run on this site: commands are read-only and the Python stand-ins model the decisions.

Two layers instead of one proxy

Ambient mode splits the work into two layers that you can adopt separately:

  1. ztunnel (the "zero trust tunnel"): a small node-level agent, deployed as a DaemonSet, that handles layer 4: it establishes mutual TLS between workloads, provides identity (a SPIFFE certificate per workload), enforces L4 authorization and emits TCP metrics. Traffic between ztunnels uses the HBONE protocol (HTTP/2 CONNECT tunnel with mTLS, on port 15008). ztunnel is written in Rust and is deliberately simple and fast.
  2. Waypoint proxies: ordinary Envoy proxies, deployed per namespace or per service account, that handle layer 7 for the workloads behind them: HTTP routing, retries and timeouts, traffic splitting, L7 authorization, fault injection and HTTP telemetry. You add a waypoint only where you need these features.

A third piece, the Istio CNI node agent, redirects the traffic of ambient pods to the local ztunnel without any init container in the pod.

flowchart LR
  subgraph node1["Node 1"]
    P1["pod A (no sidecar)"] --> Z1["ztunnel"]
  end
  subgraph node2["Node 2"]
    Z2["ztunnel"] --> P2["pod B (no sidecar)"]
  end
  Z1 -->|"HBONE mTLS"| W["waypoint (L7, optional)"]
  W -->|"HBONE mTLS"| Z2
  Z1 -.->|"L4 only: direct"| Z2

Without a waypoint, traffic goes ztunnel to ztunnel; with one, it passes through the waypoint for L7 policy.

Enabling ambient mode

Terminal
istioctl install --set profile=ambient -y
kubectl label namespace shop istio.io/dataplane-mode=ambient

That label is all that is needed to add the namespace's pods to the mesh: they receive mTLS, identity and L4 policy immediately, with no restart. Remove the label to take them out.

To add L7 features, create a waypoint for the namespace and tell the namespace to use it:

Terminal
istioctl waypoint apply -n shop --enroll-namespace
kubectl get gateway -n shop        # the waypoint is a Gateway API object of class istio-waypoint

You can also scope the waypoint to one service (--for service) so only that service pays the L7 cost. Because a waypoint is a Gateway API resource, routing for ambient uses HTTPRoute objects (see Gateway API), though VirtualService and DestinationRule are also supported on waypoints in current releases.

What ambient changes in practice

Topic Sidecar mode Ambient mode
Adding a workload Label namespace, restart pods Label namespace, no restart
Per-pod overhead A proxy in every pod Shared per-node ztunnel; waypoints only where needed
L4 mTLS and policy In the sidecar In ztunnel
L7 features Always available Need a waypoint
Upgrades Restart every pod Roll ztunnel and waypoints, apps untouched
Failure blast radius One pod One node (ztunnel) or one waypoint's traffic
Maturity Longest track record Newer; check feature status in the docs for your version

Important consequences: an AuthorizationPolicy that matches HTTP attributes (methods, paths, headers) only works where an L7 proxy is in the path, so in ambient it must target a waypoint; policies that match only source identity or ports work in ztunnel. Traffic that needs HTTP-level telemetry also requires the waypoint.

When to choose which

  • Choose ambient when you mainly want mTLS and zero trust for many workloads, when restarting pods is hard (databases, long-running jobs) or when the per-pod proxy cost is significant.
  • Choose sidecars when you need rich L7 policy on every hop, when you rely on features not yet available in ambient or when your platform is already tuned around them.
  • Mix them. The two modes can coexist in a mesh, and interoperate, so you can migrate namespace by namespace.

Try it: which component do I need?

Python Policy layer advisor

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Try it: per-pod overhead versus per-node overhead

Python Memory overhead estimate

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The real ratio depends on your traffic, configuration size and how many waypoints you deploy.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What does ztunnel provide?

    ztunnel is the node-level L4 component that secures traffic with mTLS using HBONE.
  2. 2. How do you add a namespace to an ambient mesh?

    The label enrolls the namespace's pods without restarting them.
  3. 3. An AuthorizationPolicy that matches HTTP paths in ambient mode needs...

    HTTP attributes can only be evaluated by an L7 proxy, which in ambient is the waypoint.
  4. 4. Can ambient and sidecar workloads exist in the same mesh?

    The modes can coexist, which allows a gradual migration.

Summary

  • Ambient mode removes sidecars: ztunnel (per node, L4) plus optional waypoint proxies (L7).
  • Enroll a namespace with a label; no restarts needed.
  • Use waypoints only where L7 features are required.
  • Weigh lower overhead and easy upgrades against newer maturity and node-level blast radius.

Next: Troubleshooting with istioctl