Chaos experiments are executed as Kubernetes jobs and affected pods will be taken down by the chaos executor based on the experiment definition.
Let's perform the following steps to review the results of our chaos experiments:
- Watch the experiment in progress:
$ watch kubectl get pods
Every 2.0s: kubectl get pods ip-172-20-50-43: Wed Sep 25 05:17:55 2019
NAME READY STATUS RESTARTS AGE
container-kill-klfr5-rgddd 0/1 Completed 0 2m39s
engine-nginx-runner 1/2 Running 0 4m53s
nginx-deployment-5c689d88bb-qtvsx 1/1 Terminating 1 23m
nginx-deployment-5c689d88bb-rwtk9 1/1 Running 0 3m12s
pod-delete-wzj6w-x6k5t 0/1 Completed 0 4m8s
- Get the list of results:
$ kubectl get chaosresults
NAME AGE
engine-nginx-container-kill 9m
engine-nginx-pod-delete 10m
- View the engine-nginx-container-kill experiment results:
$ kubectl describe chaosresults engine-nginx-container-kill
...
Spec:
Experimentstatus:
Phase: <nil>
Verdict: pass
Events: <none>
- View the engine-nginx-pod-delete experiment results:
$ kubectl describe chaosresults engine-nginx-pod-delete
...
Spec:
Experimentstatus:
Phase: <nil>
Verdict: pass
Events: <none>
In this recipe, we have tested and reviewed a simple scenario. You can combine existing Chaos Charts to create your experiments and write your application chaos experiments using the Litmus framework.