Why would you add a service mesh and what is the networking cost?
IntermediateScenarioKubernetes Networking
Answer
Situation read → A mesh moves cross-cutting network features into sidecars or node proxies.
What I'd do →
- Gains: mTLS between services, retries and timeouts, traffic shifting, rich L7 metrics
- Cost: extra proxy hop and CPU or memory per pod, complexity, new failure modes
- Install Istio or Linkerd and enable injection:
kubectl label ns prod istio-injection=enabled - Verify mTLS with
istioctl x describe pod <pod> - Evaluate ambient or eBPF modes to reduce overhead
Why → A mesh trades compute and operational complexity for uniform security and observability.
Interview tip → Say you adopt a mesh for a specific problem, not by default.
More on Kubernetes Networking
Explain the Kubernetes networking model in one minute.BeginnerClusterIP, NodePort and LoadBalancer: when do you use each?BeginnerHow does a pod find another service by name?BeginnerService versus Ingress: what is the difference?BeginnerWhat does a CNI plugin do and which ones do you know?BeginnerHow do you reach a pod from your laptop for debugging without exposing it?Beginner