What is a service mesh?

In short
A service mesh is a layer of infrastructure that handles network communication between services in an application. It moves tasks like encryption, retries, and traffic metrics out of application code and into dedicated proxies that sit next to each service. The documentation provided here covers Kubernetes networking in general and does not describe service meshes directly, so this page explains the concept using the Kubernetes pieces it does describe.
The problem a service mesh solves
Modern applications are often split into many small services. Each service talks to others over the network. Every call can fail, be slow, or need to be encrypted. If each team writes this logic in its own code, the results vary and are hard to monitor.
A service mesh is a shared layer that takes over this work. It places a small proxy beside each service instance. Traffic flows through these proxies, and a control component configures them all from one place. The application code can stay focused on business logic.
What Kubernetes already gives you
The Kubernetes network model is the foundation a mesh builds on. Each pod gets its own cluster-wide IP address, and pods can reach each other directly without proxies or address translation. A pod's containers share one network namespace, so they can talk over localhost.
Kubernetes also has the Service API. A Service gives a stable address for a group of pods, even when those pods change. Kubernetes keeps EndpointSlice objects up to date with the pods currently behind a Service. A service proxy, such as the default kube-proxy, reads this information and routes traffic to the healthy backends.
This matters for a mesh because the mesh needs to know which pods make up each service. Kubernetes supplies that list automatically.
How a mesh fits in
Kubernetes itself only implements part of the model. The docs note that other components provide the rest. Pod networking is handled by CNI plugins on Linux, and service proxying is handled by kube-proxy or by a pod network implementation's own proxy.
A service mesh adds another layer on top of this. Its proxies sit in the request path between services, so it can apply rules that the default proxy does not handle. Typical goals include mutual encryption between services, retries and timeouts, traffic splitting for releases, and detailed request metrics. The exact feature set depends on the mesh product you choose, so check its own documentation for details.
Note that a mesh does not replace the Kubernetes model. Pods still get their IP addresses from the network implementation, and Services still provide the stable names. The mesh works alongside these pieces.
When to use one
A mesh is worth considering when you run many services and need consistent behavior across them. Teams with strict security rules often adopt one to encrypt all service-to-service traffic without changing each application. It also helps when you need uniform telemetry.
For a small cluster with a few services, a mesh can add more complexity than value. Each proxy uses resources, and the control plane is one more system to operate. Start with the basics first: Services, DNS, and NetworkPolicy.
Built-in alternatives
Before adding a mesh, look at what Kubernetes offers. A Service gives stable addressing and load balancing. NetworkPolicy lets you limit which pods can talk to which, at the IP and port level. DNS for Services and Pods lets services find each other by name. The Kubernetes Services and networking documentation describes these pieces in detail.
Common mistakes
A frequent mistake is assuming NetworkPolicy always works. The docs say some simpler pod network implementations do not enforce it, and in that case the API exists but has no effect. Check your cluster's network plugin before you rely on it.
Another mistake is adding a mesh before you understand the default networking. Problems that look like mesh issues are often Service selector or DNS problems. Learn how Services and EndpointSlices work first, so you can tell which layer is failing.
Finally, remember that a mesh adds a proxy to every request path. Measure latency and resource use after you install one, and roll it out gradually to a few services at a time.
FAQ
Is a service mesh the same as Kubernetes networking?
No. Kubernetes defines the core network model, Services, and NetworkPolicy. A service mesh is an extra layer that adds its own proxies and controls on top of that model.
Do I need a service mesh to run Kubernetes?
No. Kubernetes works without one. Pods, Services, DNS, and NetworkPolicy cover many common needs, and a mesh is useful mainly when you need consistent traffic rules across many services.
What does kube-proxy do?
kube-proxy is the default service proxy in Kubernetes. It watches Service and EndpointSlice objects and routes traffic sent to a Service to its backend pods.
Does NetworkPolicy work in every cluster?
Not always. Some simpler pod network implementations do not enforce NetworkPolicy, so the API has no effect there. Confirm that your network plugin supports it.
Sources
This page is based on the official documentation below. Read it for full detail.
Service mesh — official documentation ↗Service mesh in the news
Google Cloud Previews Network Services Monitoring for GKE Ambient Networking
Google Cloud has launched a preview of Network Services Monitoring, a tool that shows layer 4 network telemetry for GKE services alongside application context. It aims to let service owners and network teams troubleshoot from the same view.
Google Cloud Adds Kubernetes Events, Hardware Fault Links and Structured Logs to Ray on GKE
Google Cloud and KubeRay added Kubernetes platform events to the Ray Dashboard, forwarding of node GPU faults to affected clusters, on-demand JAX profiling on TPUs, and structured logs by default. The changes aim to show whether a Ray failure started in code, scheduling, or hardware.
Sandbox vendors pitch speed over security as agent breakouts raise questions
Stack Overflow's podcast examined how sandboxes isolate AI agents, following a Hugging Face breakout that the guests called both alarming and predictable. Vendors say most buyers pay for performance rather than security.


