Use the service mesh for east west traffic control and the gateway for north south exposure, then verify both layers with metrics and traces. Define namespaces clearly, enable injection where needed, and apply routing rules intentionally so external requests land on the correct service. This keeps policy, observability, and exposure boundaries aligned.
How to split traffic responsibility between the mesh and the gateway
A service mesh and an api gateway solve different routing problems, and best practice is to keep that separation explicit. The gateway should handle north-south entry, authentication edge policy, and exposure to external clients, while the mesh should govern east-west service-to-service traffic, retries, telemetry, and in-cluster policy enforcement.
That split matters because it reduces policy duplication and prevents two control planes from trying to own the same decision. In Kubernetes, the cleanest designs make the gateway the controlled ingress boundary and the mesh the internal enforcement layer, so operators can reason about where traffic enters, where it is inspected, and where service identity or mTLS policy is enforced.
For clusters that rely on workload identity and mutual TLS, this separation is often easier to manage when the mesh is aligned with SPIFFE and SPIRE style identity boundaries, because the service mesh can then bind routing and policy to workload identity rather than to brittle network location.
How to design namespaces, routing, and policy boundaries
Namespace design should reflect trust and ownership, not just application packaging. When the gateway fronts multiple teams or products, isolate ingress routes and keep namespace-level defaults clear so that an application does not inherit broader network reach than intended. This is especially important when routing rules, sidecar injection, and network policies are managed by different platform teams.
Routing should be intentional at both layers. The gateway should map external requests to a small number of well-defined entry points, while the mesh should direct only the internal service calls that are expected for that workload. A common failure mode is to let gateway paths drift into ad hoc service exposure, which makes ownership unclear and weakens the value of the mesh.
From a security operations perspective, the combined design works best when teams can prove where exposed entry points exist and how they are protected. For container and orchestrator environments, that means pairing routing intent with hardened runtime assumptions described in NIST SP 800-190 Container Security, especially around orchestration boundaries, runtime controls, and misconfiguration risk.
How to validate the setup with observability and policy checks
Verification should be continuous, not a one-time deployment test. The direct answer already points to metrics and traces, and that is the right practical baseline because the mesh and gateway should both emit evidence that shows policy decisions, request paths, and failure points. If you cannot trace a request from external entry to internal service hop, then the intended boundary between the two layers is not yet trustworthy.
At minimum, validate that the gateway is the only external exposure path, that mesh policy is actually enforced on service-to-service calls, and that telemetry shows the same route the platform team believes it configured. This is where API-focused security checks are useful, because exposed endpoints and authorization edges should be reviewed like any other API surface. The OWASP API Security Top 10 is a useful companion for reviewing broken authorization, unrestricted exposure, and sensitive-flow handling at the gateway boundary.
For teams that also operate container registries, sidecars, and ingress controllers as part of the same platform path, the operational lesson is the same: observe the control boundary you expect to enforce, not just the traffic that happens to work. That discipline also aligns well with OWASP Web Security Testing Guide style validation of request handling and access paths.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
NIST SP 800-53 Rev 5, CIS Controls v8 and CSA Cloud Controls Matrix set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST SP 800-53 Rev 5 | IA-9 — Service Identification and Authentication | Mesh-to-mesh traffic depends on authenticated workload identity and service trust. |
| AC-4 — Information Flow Enforcement | Gateway and mesh routing separate exposure and internal flow enforcement. | |
| AU-6 — Audit Review, Analysis, and Reporting | Metrics and traces are needed to verify request paths and policy decisions. | |
| Recommendation — Enforce service-to-service authentication for in-cluster traffic. Apply information flow controls at ingress and east-west boundaries. Review telemetry to confirm policy enforcement and route accuracy. | ||
| CIS Controls v8 | CIS-12 — Network Infrastructure Management | Kubernetes ingress, service mesh, and routing rules are infrastructure controls. |
| Recommendation — Standardize and document ingress and service routing configurations. | ||
| CSA Cloud Controls Matrix | IAM — Identity and Access Management | Gateway and mesh policy both depend on identity-aware access enforcement. |
| Recommendation — Tie route access to identity-aware controls and least privilege. | ||
Practitioner Guidance
What to verify: Confirm that external requests terminate at the gateway and that internal east-west access is still constrained by mesh policy, not merely by convention. If sidecar injection is partial, treat the uncovered namespaces as a separate risk class until they are either intentionally excluded or brought under the same policy model.
What good looks like: Operators can point to a request trace, a gateway rule, and a mesh policy decision for the same transaction. That gives you a practical test for whether the platform boundary is real, or whether routing and enforcement have drifted apart.
Common mistake: Using the gateway as a second service mesh, or allowing the mesh to become an unreviewed ingress layer. That usually creates duplicate policy logic, inconsistent observability, and unclear ownership when an outage or misroute occurs.
Practitioner takeaway: The best Kubernetes designs make the gateway the external contract and the mesh the internal control plane, with observability proving that those two layers still match the traffic they are supposed to govern.
Related resources from NHI Mgmt Group
- How should organisations unify API gateway and service mesh controls without weakening security boundaries?
- Why does combining an API gateway with a service mesh reduce risk in distributed environments?
- What is the difference between an API gateway and a service mesh?
- Why do Active Directory service accounts complicate zero trust programs?