- A Kubernetes cluster with Istio installed and sidecar injection enabled for your namespace.
kubectlconfigured to talk to the cluster.
- Verify the namespace has Istio sidecar injection enabled
- Deploy the helloworld sample application
- Create a test pod (use an image with
curlavailable)
- Confirm the helloworld service
- Smoke test the application from the test pod
- Verify there are no existing VirtualServices or DestinationRules in the namespace
Do not apply fault injections in production clusters or against production services unless you have explicit permission and proper safeguards. Fault injection will deliberately break or delay traffic.
- Inject a fixed 5s delay for 100% of traffic
vs-delay.yaml:
helloworld:5000 is delayed by approximately 5 seconds.
- Change the fault to an abort (inject HTTP error responses)
vs-abort-500.yaml to abort 100% of requests with HTTP 500:
httpStatus to 404, 503, etc., to simulate different server responses.
- Inject a 50% abort (random failures)
vs-abort-50.yaml) to abort 50% of requests with HTTP 404:
HTTP/1.1 200 OK and half HTTP/1.1 404 Not Found (randomness and sample size affect exact counts). The same pattern can be used for percentage-based delays.
- Conditional fault injection (by header match)
end-user header equal to jason:
end-user: jason is present.
Fault injection in Istio is configured on VirtualService resources. Circuit-breaking and connection-level controls belong in DestinationRule resources — make sure to use the correct resource for each purpose.
- References and next steps
- Istio VirtualService reference: https://istio.io/latest/docs/reference/config/networking/virtual-service/
- Fault injection task guide: https://istio.io/latest/docs/tasks/traffic-management/fault-injection/
- Next steps: configure client-side retries and timeouts in Istio to make your clients resilient to transient faults.