Skip to main content

Istio Traffic Policy Builder

Configure canary splits, fault injection, and retries. Get VirtualService YAML, DestinationRule YAML, and kubectl apply commands ready to paste.

✓ Traffic split (canary / blue-green) ✓ Fault injection (delay / abort) ✓ Retries & timeouts ✓ kubectl apply commands

Service Configuration

Traffic Split

0% canary (100% stable) 50/50 100% canary

Fault Injection (Optional)

Retries & Timeout

VirtualService.yaml
 

Frequently Asked Questions

What is a VirtualService in Istio?▼

A VirtualService defines how traffic is routed to a Kubernetes service. Unlike a Kubernetes Service (which is just a stable IP), a VirtualService lets you split traffic by percentage, match on HTTP headers/paths/methods, apply retries, timeouts, and fault injection. It's the core traffic management primitive in Istio.

What is a DestinationRule and when do I need it?▼

A DestinationRule configures policies applied to traffic after routing: load balancing strategy, connection pool settings, circuit breaker (outlier detection), and TLS mode. You also use it to define subsets — named groups of pods selected by labels (e.g. version: v1 vs version: v2). VirtualService references these subsets for weighted routing (canary deployments).

How does canary deployment work in Istio?▼

Deploy both v1 and v2 of your app with different labels (e.g. version: v1, version: v2). Create a DestinationRule defining two subsets based on those labels. Then use a VirtualService to split traffic: send 90% to subset v1 and 10% to v2. Gradually shift traffic to v2 (10→25→50→100%) as you gain confidence, with instant rollback by changing the weight back to 0.

What is fault injection and why use it?▼

Fault injection tests your system's resilience by deliberately introducing failures. Istio supports two types: (1) HTTP delay — adds latency to a percentage of requests to test timeout handling, and (2) HTTP abort — returns error codes (e.g. 503) to test circuit breakers and retry logic. Unlike chaos engineering tools that affect infrastructure, Istio faults are applied at the proxy level with no code changes.

What is the difference between retry and circuit breaker?▼

Retries automatically re-send failed requests (up to N times, with backoff). They handle transient failures but can amplify load during outages. Circuit breakers (outlier detection in Istio) track error rates per endpoint and temporarily eject unhealthy hosts from the load balancer pool — preventing overload. Use both: retries for occasional failures, circuit breaker to protect against cascading failures.

Do I need Istio for canary deployments?▼

No, but Istio makes it much easier. Without Istio, canary routing depends on Kubernetes Service selector (which is binary — all traffic or none), so you'd need to manually scale replicas to approximate traffic percentages. Istio decouples traffic weight from replica count, enabling precise percentages regardless of pod count.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →