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
Preparing for an interview?

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

← All Istio & Service Mesh questions