Interview › Istio & Service Mesh
What is a DestinationRule, and how does it relate to a VirtualService?
Istio & Service Mesh · Basic level
Answer
A DestinationRule defines policies for traffic after routing has selected a service destination. It commonly declares subsets, load-balancing behavior, connection-pool limits, TLS mode, and outlier detection. VirtualService chooses where traffic goes; DestinationRule defines how traffic behaves at that destination.
Technical explanation
Subsets map logical labels such as v1 and v2 to workload labels on pods.
Traffic policies can be global for a host or overridden per subset.
Without the matching DestinationRule subsets, a VirtualService that references subset v2 will not route correctly.
Hands-on example
Example subset definition:
apiVersion: networking.istio.io/v1
kind: DestinationRule
metadata:
name: reviews
spec:
host: reviews
subsets:
- name: v1
labels:
version: v1
- name: v2
labels:
version: v2
trafficPolicy:
loadBalancer:
simple: LEAST_REQUEST
Check 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
- What is Istio, and what are the core capabilities it provides?
- What is the difference between the Istio control plane and data plane?
- What is istiod, and what does it do?
- What is Envoy, and what role does it play in Istio?
- What is the sidecar pattern, and how does Istio inject the proxy?
- How does automatic sidecar injection work (namespace label, webhook)?
- What is the Istio ambient (sidecarless) mode, and how does it differ from sidecar mode?
- What is the difference between ztunnel and a waypoint proxy in ambient mode?