DestinationRules are as important as VirtualServices in Istio traffic management. A VirtualService intercepts incoming requests for a service and decides where that traffic should go (routing). DestinationRules complement VirtualServices by declaring how traffic should be handled once routing has selected the destination host—applying policies such as subsets, load balancing, connection pools, TLS, and outlier detection.Documentation Index
Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
Use this file to discover all available pages before exploring further.

- VirtualService: decides where traffic goes (routing rules, host selection).
- DestinationRule: decides how traffic is treated for the chosen host (per-host or per-subset policies).

- Define subsets (e.g., v1 / v2) that map to pod labels.
- Apply different traffic policies per subset or service-level policies (load balancing, connection pools, outlier detection, TLS, etc.).
- Enforce mTLS for service-to-service communication.
| Config object | Primary responsibility | Common use cases |
|---|---|---|
| VirtualService | Routing rules, traffic splitting, match conditions | A/B tests, canary rollout, path-based routing |
| DestinationRule | Post-routing policies (subsets, LB, connection pools, TLS, outlier detection) | Define subsets by labels, set load balancing, enforce mTLS, circuit breaking |
- Deploy two application versions. Notice they share
app: frontendbut differ byversionlabel:
- Expose both versions with a single Kubernetes Service that selects
app: frontend:
- Define a DestinationRule that declares the subsets for these versions. Each subset maps a name to pod label selectors (the
versionlabel):
- Create a VirtualService that references those subsets to split traffic 50/50. The
subsetfield here must match thenamevalues defined in the DestinationRule:
Ensure subset names in the VirtualService (
subset: v1) exactly match the name values defined under subsets in the DestinationRule. Mismatched names cause route resolution failures.- Simple round-robin load balancing:
- Consistent-hash load balancing by HTTP cookie:
- Circuit breaking, connection pool tuning, outlier detection, and mTLS settings can also be configured per-host or per-subset in a DestinationRule.
DestinationRules can configure subsets, load-balancing strategies, connection pools, outlier detection (circuit breaking), and client TLS settings (e.g., enforcing mTLS). These policies apply after routing has selected the destination.
- Apply manifests with
kubectl apply -f <manifest.yaml>to test in your cluster. - Use
istioctl analyzeto validate Istio configuration and catch common pitfalls. - To debug traffic routing and policy effects, inspect Envoy proxies (
istio-proxylogs) and useistioctl proxy-configcommands.