Egress control and the locked-down cluster
The Mesh Series · Article 22
Egress controlService meshIstioAuthorizationPolicy.NET & C#Ambient meshAzureCompliance evidence

You spent three articles locking the front door. You terminated user identity at the mesh edge, validated every token in code, and made default-deny the baseline for anything trying to get in. Then you shipped, and your zero-trust cluster quietly kept a second door open — the one facing out. By default, every workload in your mesh can dial any address on the internet, and Istio will help it do so.
That is not an oversight in your config. It is the default.
Istio ships with outboundTrafficPolicy.mode set to ALLOW_ANY. The sidecar lets calls to unknown external services pass straight through. Convenient for a demo — you install the mesh and your services keep reaching their dependencies with no extra YAML. But "reaches its dependencies" and "reaches anything, to anywhere" are the same setting. A compromised pod, a leaked token, a malicious dependency pulled in through your supply chain — all of them get the same open line out that your legitimate payment call does.
Egress is the allow-list for the way out. It is also the door the auditor checks first.

Ingress asks who's coming in. Egress asks where your data gets to go.
Most people spend their mesh-security budget on ingress, because ingress is where the attacker is imagined to be — outside, knocking. That instinct is half a control. The interesting question at an audit is rarely "who got in." It is "once something is running in your cluster, where can it send data?"
Ask a regulator's assessor to poke at a meshed cluster and watch where they go. They open a shell in a pod and try to reach an address that has nothing to do with your application — a paste site, an IP in another region, their own listener. If the packet leaves, you have just demonstrated the exact shape of a data-exfiltration finding: a workload in your cardholder-data environment can initiate an arbitrary outbound connection. It does not matter that no attacker used it today. The capability is the finding.
For institutions in India and the Middle East the stakes are sharper than generic exfiltration, because the data is not allowed to leave in the first place. RBI's payment-data localization mandate keeps payment system data only in India. Saudi Arabia's residency rules keep financial data in-Kingdom. You cannot localize data you cannot stop from leaving — and "stopping it from leaving" is not a policy document, it is an egress control at the boundary where a socket actually opens. An ALLOW_ANY cluster is a cluster whose every workload can, in principle, stream regulated data to an address in another jurisdiction. Your data-residency attestation is only as true as your egress posture makes it.
This is the demo-to-audit gap in one setting. In the demo, the open outbound path is invisible — everything just works. In the audit, someone asks you to prove the cluster can't talk to the internet at large, and "it never has, as far as we know" is not proof.
Where egress sits between Kubernetes, Istio, C#, and Entra
Look at what one of your services actually calls on the way out. A payment authorization API at your acquirer. A KYC/AML screening service. Your identity provider's token endpoint. Key Vault for the one secret you couldn't federate away. A managed database. Each of those is an outbound connection leaving the pod — and each one, right now, is indistinguishable from a call to anywhere else on the internet, because the mesh treats them all as "external, allowed."
Egress control is the discipline of turning that undifferentiated "the internet" into a named list of destinations. The mechanism has two moving parts and they work together.
First, you flip the default. Setting outboundTrafficPolicy.mode to REGISTRY_ONLY tells every sidecar to block any host that is not registered in the mesh — no Kubernetes service, no ServiceEntry, no exit. This is the same move you already made at L7 with default-deny AuthorizationPolicy (Article 16), now applied to the outbound path. Deny first. Then name what is allowed.
Second, you name each legitimate dependency with a ServiceEntry. That resource adds an external host to the mesh's registry — hostname, port, protocol, resolution — so the sidecar knows this specific destination is permitted and how to reach it. The ServiceEntry set becomes your outbound allow-list, and, not by coincidence, your declared-dependency inventory. An auditor who asks "what does this service talk to?" gets a straight answer from Git instead of a shrug.
There is a trap worth naming here, because it bites during the rollout, not the design. Your Entra calls go out through egress too. login.microsoftonline.com, the JWKS metadata endpoint your token validation fetches keys from (Article 12), Key Vault, Cosmos — those are all outbound. Flip REGISTRY_ONLY without declaring them and you don't get a tidy "egress blocked" banner. You get authentication failing across the board with no deployment to blame, exactly the signature we chased in Article 12. The fix is boring: the platform dependencies are the first ServiceEntry objects you write, before anyone else's.

The app code does not change. This is the pattern that keeps recurring across the series: the artifact is configuration, not application code. Your C# service still constructs an HttpClient and calls its payment partner by hostname. Whether that call is governed — allowed because it's declared, blocked because it isn't — is decided in the mesh, not in a code path some developer has to remember to write. Governance you have to re-implement in every service is governance you don't have.
For the destinations that resist a static list — the cloud endpoints hiding behind wildcards like *.vault.azure.net or *.documents.azure.com — Istio 1.30 finally has a clean answer. A ServiceEntry with resolution: DYNAMIC_DNS matches a wildcard host and lets the sidecar resolve the specific subdomain at connection time from the TLS SNI, without an intermediate egress-gateway hop and without the EnvoyFilter archaeology this used to require. You allow-list the shape of the destination without pretending you can enumerate every subdomain a hyperscaler will invent.

Scope the allow-list per namespace so payments cannot inherit the exit rights of some other team's namespace. The Sidecar resource is the least-privilege knob for egress: it restricts which hosts a namespace's workloads can even see. On AKS specifically — where most of this series' readers actually run — you don't hand-build the egress gateway. The Istio add-on ships it as a GA feature, and it builds on the Static Egress Gateway so your outbound traffic leaves from a fixed source IP prefix — the thing your acquirer's firewall allow-lists so they'll accept your connection, and the thing your own perimeter firewall pins so a packet that doesn't originate from the egress gateway never reaches the internet at all.

[ABK — optional war story, only if real: the first time you turned on an egress allow-list (REGISTRY_ONLY, a Sidecar scope, or an Azure Firewall FQDN rule), what undocumented outbound dependency broke — a telemetry endpoint, a license check, a package mirror, an OCSP call? If there's a real one, it slots in here as the "deny-all-and-watch-what-screams" moment for egress. If not, delete this block.]
Security · Audit · Integration
Security property gained. Default-deny on the outbound path. A compromised workload still cannot open a line to an address you never declared — you've removed the exfiltration channel as a capability, not merely watched for its use. Combined with default-deny AuthorizationPolicy (Article 16), the cluster now says no in both directions by default.
Audit evidence produced. The ServiceEntry set is a machine-readable inventory of every external system your platform depends on. And the egress gateway's access logs record every outbound call with the calling workload's SPIFFE identity attached (Article 14): which workload reached which external host, when — the raw material the evidence layer (Article 24 on) turns into signed, tamper-evident proof.
Integration. The fixed egress IP lets the perimeter firewall and external partners allow-list you by source address — L3 identity to pair with the mesh's L7 identity. Belt and suspenders (Article 20): mesh egress governs what it can see, the perimeter firewall backstops what it can't.
Alternatives and trade-offs
Mesh egress is not the only way to control the way out, and in a serious build it is rarely the only control you run.
A cloud firewall — Azure Firewall with user-defined routes and FQDN rules — is the perimeter answer. It governs every packet leaving the VNet regardless of whether the workload is meshed, which is exactly the gap mesh egress can't close on its own: a non-mesh pod, a DaemonSet, a debug exec that opens a raw socket the sidecar never sees. Pick the cloud firewall as the outer ring when you want one enforcement point across many clusters that no in-cluster bypass can escape.
Cilium does DNS-aware egress policy in eBPF, in the kernel, with no proxy hop. Pick it when you're not committed to Istio, or when you want L3/L4 egress with FQDN awareness and can't afford the gateway latency. A NAT gateway plus external firewall gives you a stable outbound IP and coarse allow-listing with no mesh involvement; pick it when the requirement is genuinely just "leave from a known IP."
What mesh egress gives you that the perimeter alternatives don't is identity-aware egress: the rule can be written against the SPIFFE identity of the calling workload, TLS can be originated at the gateway, and the audit trail ties an outbound call to a named service account rather than a pod IP that was reassigned twenty minutes ago. The honest architecture in a regulated shop runs both — mesh egress for identity and evidence, a cloud firewall for the un-meshed backstop and the residency-hard boundary. If you only get one, and your binding requirement is "prove data cannot leave the country," start at the perimeter firewall, because that's the boundary the assessor will actually test.
[ABK — optional war story, only if real: in BFSI you often have to hand a partner a fixed source IP before they'll accept your traffic, or an auditor/pentester has flagged an unrestricted outbound path. Have you lived either — a partner integration gated on a static egress IP, or an audit/red-team egress finding? A concrete detail (what was found, how it was caught) slots in here. If not, delete this block.]
From simple to standard, and what's next
The toy version is one line of mesh config and a handful of ServiceEntry objects: REGISTRY_ONLY, plus your payment API, your IdP, your vault. That alone moves you from "talks to anything" to "talks to a list," which is most of the audit value.
The industry-grade version adds the parts that make it hold under scrutiny. Per-namespace Sidecar egress scoping so exit rights don't leak between teams. A dedicated egress gateway with a static source IP registered in both the perimeter firewall and your partners' allow-lists. DYNAMIC_DNS entries for the cloud wildcards you can't enumerate. The entire allow-list living in Git, reviewed like code and enforced by admission control (Article 21), so "add a new external dependency" is a pull request with a reviewer — the GitOps loop Article 31 assembles. And the egress access logs shipped to the evidence store, because an allow-list you can't prove was enforced is a promise, not a control.
One honest note on the road ahead. Everything above is the sidecar model, which is mature and battle-tested. As you move to ambient (Articles 32–33), egress moves with it: ztunnel handles the outbound L4 path and a waypoint takes the role of the egress gateway, with ServiceEntry bound to the waypoint and DNS capture enabled at the CNI. It works, and it's where the project is heading — but as of Istio 1.30 the ambient egress story is younger and less proven than sidecar egress. Verify its maturity against the current release when you actually migrate, and keep the perimeter firewall as the control you'd stake a residency attestation on until it is.
Next up, Article 23: threat-modeling a meshed .NET API. You've now built the front door, the identity checks, the default-deny interior, and the locked back door. Time to put on the attacker's hat and walk the whole thing looking for the gap you left — because the auditor's assessor already is.
The Mesh Series — Kubernetes, Istio, C#/.NET, and Microsoft Entra ID for regulated cloud. Code samples run on .NET 10 and Istio 1.30; full runnable versions in the companion repo.
Key skills & topics in this article
Egress controlService meshIstioAuthorizationPolicy.NET & C#Ambient meshAzureCompliance evidence
Also on LinkedIn.