CKAD, Lightening lab 2, liveness probe fails

Hi,

I am facing issue in task 1 (lightening lab 2) CKAD.
When i proceed as instructor says, my liveness probe is failing. Tried multiple times.

Events:
Type Reason Age From Message
Normal Pulled 22s kubelet Container image “kodekloud/nginx” already present on machine
Normal Created 22s kubelet Created container nginx
Normal Started 21s kubelet Started container nginx
Warning Unhealthy 6s kubelet Liveness probe failed: ls: cannot access ‘/var/www/html/file_check’: No such file or directory

Anyone has idea what is wrong?

I had added following lines in pod.yaml:
livenessProbe:
exec:
command:

  • ls
  • /var/www/html/file_check
    initialDelaySeconds: 10
    periodSeconds: 60

root@controlplane ~ kubectl -n dev1401 exec nginx1401 -it – sh

ls /var/www/html/file_check

ls: cannot access ‘/var/www/html/file_check’: No such file or directory

Hi @g4ganeshsemalty

You haven’t done anything wrong. The liveness probe is meant to fail here! Assuming you got the first part of the question correct and fixed the port error, you will find that the question is marked completed when you end exam.