Viewing chaos experiment logs

Logs are always collected and stored by the standard Kubernetes logging frameworks that are used on your cluster. In cases where you need to review them quickly, you can use access to the kubelet logs.

Let's perform the following steps to take a deeper look at the tasks that are executed during the chaos experiments:

  1. Get the list of pods that were created by the completed jobs:
$ kubectl get pods |grep Completed
container-kill-klfr5-rgddd 0/1 Completed 0 35m
pod-delete-wzj6w-x6k5t 0/1 Completed 0 37m
  1. View the logs using the kubectl logs command:
$ kubectl logs container-kill-klfr5-rgddd
...
TASK [Force kill the application pod using pumba] ******************************
...
TASK [Verify restartCount] ***************************************************
...
PLAY RECAP *******************************************************************
127.0.0.1 : ok=29 changed=18 unreachable=0 failed=0
2019-09-25T05:15:56.151497 (delta: 1.254396) elapsed: 35.944704 *******

Inside the logs, you will be able to see the individual tasks that have been executed and the summary of passed or failed tasks.