---
name: "istio-service-mesh-traffic-splitting"
description: "Manage layer 7 traffic routing, canary weight splits, and resilience testing with Istio."
metadata:
  author: "Istio"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "configure istio virtualservice"
  - "split traffic percentage istio"
  - "inject http delay istio"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Istio VirtualService Traffic Splitting & Fault Injection

Configures Istio service mesh: defining VirtualService and DestinationRule resources, canary percentage weighting, HTTP fault injection (delays, aborts), header-based routing, and connection pool timeouts.

## When to Invoke
Invoke this skill whenever you need to:
- configure istio virtualservice
- split traffic percentage istio
- inject http delay istio

## Execution SOP & Rules
1. Create DestinationRule defining subsets (v1, v2) based on pod labels (version: v1).
2. Create VirtualService with spec.http.route directing weights (e.g. 90 to v1, 10 to v2).
3. Configure fault injection under spec.http.fault with delay or abort percentages for chaos engineering.
4. Validate configuration using istioctl analyze before applying changes to production namespaces.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
