Interview › Istio & Service Mesh
How do you exclude certain ports or IP ranges from sidecar interception?
Istio & Service Mesh · Intermediate level
Answer
Istio can exclude specific inbound ports, outbound ports, outbound IP ranges, or interfaces from sidecar interception using traffic.sidecar.istio.io annotations. I use this only for well-understood exceptions because exclusions bypass mesh policy and telemetry.
Technical explanation
Examples include node-local agents, backup traffic, special database clients, or ports that cannot tolerate proxy interception.
Every exclusion should be documented with owner, reason, expiry, and compensating controls.
After applying an annotation, the pod must be recreated for injection and redirection config to change.
Hands-on example
Pod annotation example:
metadata:
annotations:
traffic.sidecar.istio.io/excludeOutboundIPRanges: 169.254.169.254/32
traffic.sidecar.istio.io/excludeInboundPorts: '15020'Validate:
$ kubectl rollout restart deploy/app -n app
$ istioctl proxy-config listeners deploy/app -n appCheck how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.
More Istio & Service Mesh interview questions
- Why might traffic bypass the sidecar, and how do you verify injection?
- How do you handle non-HTTP (TCP) traffic in Istio?
- What is a common cause of 503 errors in Istio, and how do you diagnose it?
- How do you debug mTLS handshake failures between two services?
- What is the difference between Istio and an API gateway?
- What does istioctl analyze do?
- How do Istio Gateways relate to the Kubernetes Gateway API?
- How do you use istioctl proxy-config and proxy-status to debug Envoy?