Discuss your project

Blog

A zero-trust Istio mesh in 3 months, after 1.5 years of being blocked

Mher Poghosyan · 29 November 2026 · 8 min read

An iGaming and crypto company was preparing a regulated launch in New Jersey. The state’s gaming rules (N.J.A.C. 13:69O and the GLI-19 standard for interactive gaming systems) required a zero-trust service mesh, and that project had been blocked for a year and a half. Our lead engineer, Mher Poghosyan, was transferred to the team to deliver it. He ran the proof of concept and the validation plan and, as the core implementation engineer, delivered the mesh on EKS in 3 months.

This article walks through the design: why Istio ambient mode, how traffic gets in and out, why default-deny needs a rollout plan, and how the mesh became a building block that any team turns on in about 10 minutes, without changing application code.

What zero trust means in practice

For an audit, the words have to become properties you can check:

  1. Every connection between services is encrypted and mutually authenticated.
  2. Every workload has a cryptographic identity, not just an IP address.
  3. Nothing is allowed unless a policy explicitly allows it.
  4. The rules live in git, so you can show who changed what and when.

Istio covers the first three with mTLS, SPIFFE identities and authorization policies. A workload’s identity comes from its Kubernetes service account, for example spiffe://cluster.local/ns/payments/sa/payments-api. The fourth point is GitOps.

Start with a validation plan

A mesh project that stalls for a long time rarely lacks engineers. More often nobody has written down what “done” means, so every discussion about tools starts from zero. Here the work started with a PoC and a validation plan: a list of claims, each with a test that proves it.

For a mesh like this, the list looks roughly like this:

Each item is a command someone else can repeat:

# A pod outside the mesh must not reach a meshed service in plaintext
kubectl create namespace mesh-test
kubectl run probe -n mesh-test --rm -it --restart=Never --image=curlimages/curl \
  --command -- curl -sS -m 5 http://payments-api.payments:8080/healthz
# expected: the connection is reset

This changes the conversation. “Is the mesh ready?” becomes “which test fails?”, and the passing tests double as evidence for the auditors.

Why ambient mode

Classic Istio adds an Envoy sidecar to every pod. Ambient mode splits the data plane in two:

For a mesh that has to cover every team, this matters more than it seems:

The trade-offs are real: ambient is younger than sidecars, some features work only through a waypoint, and ztunnel is a per-node component, so a problem with it affects every meshed pod on that node. That is exactly what the validation plan is for.

kubectl label namespace payments istio.io/dataplane-mode=ambient
istioctl waypoint apply -n payments --enroll-namespace   # only if this namespace needs L7

Calico runs underneath and adds L3/L4 network policy, which also covers pods outside the mesh. One pitfall when you combine the two: in ambient mode, meshed traffic arrives at the destination pod on port 15008 (HBONE), and kubelet health probes come from 169.254.7.127. A NetworkPolicy that does not allow both breaks traffic that looks unrelated.

How traffic gets in and out

The ingress controller was replaced with Gateway API gateways for four kinds of traffic:

Keeping these on separate gateways means separate exposure, certificates and policies, so a mistake in one does not open the others. A public gateway and a team’s route:

apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
  name: public
  namespace: istio-ingress
spec:
  gatewayClassName: istio
  listeners:
    - name: https
      hostname: "*.example.com"
      port: 443
      protocol: HTTPS
      tls:
        mode: Terminate
        certificateRefs:
          - name: wildcard-example-com
      allowedRoutes:
        namespaces:
          from: Selector
          selector:
            matchLabels:
              gateway.example.com/public: "true"
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: web
  namespace: web
spec:
  parentRefs:
    - name: public
      namespace: istio-ingress
  hostnames: ["app.example.com"]
  rules:
    - backendRefs:
        - name: web
          port: 8080

allowedRoutes matters: without it, any namespace could attach a route to the public gateway. Certificates come from Let’s Encrypt for public names and from an internal CA for internal ones. Egress follows the same principle as inbound traffic: the external hosts the platform may call are listed explicitly, and everything else is blocked.

STRICT mTLS and default-deny without an outage

The target state is two small policies in the Istio root namespace:

apiVersion: security.istio.io/v1
kind: PeerAuthentication
metadata:
  name: default
  namespace: istio-system
spec:
  mtls:
    mode: STRICT        # no plaintext anywhere in the mesh
---
apiVersion: security.istio.io/v1
kind: AuthorizationPolicy
metadata:
  name: allow-nothing
  namespace: istio-system
spec: {}                # allows nothing, so everything is denied

Applied on day one, they break things nobody listed: metrics scraping, gateways calling backends, CronJobs, forgotten cross-namespace calls, admission webhooks called by the Kubernetes API server, which is not in the mesh. Each of these fails the moment the policy lands. It is also easy to miss that in Istio the first ALLOW policy on a workload already denies everything else to it. Adding an allow rule is enforcement too.

So default-deny needs a rollout plan. The order we recommend:

  1. Enroll namespaces with no deny rules and mTLS in PERMISSIVE mode. Watch real traffic in Kiali long enough to see nightly and weekly jobs.
  2. Write allow rules from what you observed, per namespace, in git.
  3. Turn on a namespace-level allow-nothing in stage, run the validation tests, then repeat in production.
  4. When every namespace has its rules, switch on mesh-wide STRICT and allow-nothing.
  5. Keep rollback cheap: a policy is a file in git, and reverting it is one merge.

Allow rules use identities, not IPs. This one lets only the API’s service account call the payments service on one port, and ztunnel enforces it without any waypoint:

apiVersion: security.istio.io/v1
kind: AuthorizationPolicy
metadata:
  name: payments-api
  namespace: payments
spec:
  selector:
    matchLabels:
      app: payments-api
  action: ALLOW
  rules:
    - from:
        - source:
            principals: ["cluster.local/ns/api/sa/api"]
      to:
        - operation:
            ports: ["8080"]

One trap specific to ambient: when a namespace uses a waypoint, the destination’s ztunnel sees the waypoint as the caller. L4 rules on the destination must allow the waypoint’s identity, and the per-client rules move to an L7 policy attached to the waypoint.

A building block, not a project per team

The other reason such projects stall is that every team gets its own mesh migration. Here the mesh was packaged once, as a self-service building block:

The flag pattern itself is simple (the names here are illustrative):

variable "service_mesh_enabled" {
  type    = bool
  default = false
}

resource "helm_release" "ztunnel" {
  count      = var.service_mesh_enabled ? 1 : 0
  name       = "ztunnel"
  repository = "https://istio-release.storage.googleapis.com/charts"
  chart      = "ztunnel"
  version    = var.istio_version
  namespace  = "istio-system"
}

With that in place, a team enables the mesh in about 10 minutes, with no application code changes. In a setup like this, that means turning on the flag, filling in values for routes, allow rules and egress hosts, and merging; Argo CD does the rest.

Application code stays the same, but Helm charts usually need work, and all existing charts were reworked for the mesh. Typical changes in such a rework:

Observability and handover

A mesh you cannot see into gets blamed for every outage. The building block came with:

Mher wrote the HOWTO and handed the building block over to the platform team. A mesh that only one engineer understands is a risk, not a deliverable.

Checklist

If a security or compliance requirement has been stuck on your roadmap for months, tell us what is in the way.

#kubernetes#istio#security#devops