Skip to main contentKubernetes   Training

Fault Injection

To test microservices for resiliency, Istio allows us to inject delays and errors between services.

Let’s start the Lab.

  1. Let’s create a VirtualService that creates 50% of 501 errors when the details service is called.

    apiVersion: networking.istio.io/v1alpha3
    kind: VirtualService
    metadata:
    name: details
    spec:
    hosts:
    - details
    http:
    - fault:

    Run the following:

    kubectl apply -f ./istio/samples/bookinfo/networking/fault-injection-details-v1.yaml
    > virtualservice.networking.istio.io/details created
    > destinationrule.networking.istio.io/details created
  2. In Kiali click on the productpage (orange) box and after a short while you should see 500 errors appearing. In the right side dtail panel you will see additional information about the problem in your communication between microservices.