CKAD Application Observability and Maintenance Practice Question
A pod uses a liveness probe with exec command 'cat /tmp/healthy'. The file /tmp/healthy exists initially but is deleted by the application after 60 seconds. Which behavior will occur?
⚠ Common exam trap
It's easy for candidates to confuse liveness probes with readiness probes: candidates often think a failing liveness probe removes the pod from the Service (which is a readiness probe behavior) or triggers a pod-level action like deletion, rather than the correct container restart by kubelet.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The liveness probe will fail and the container will be restarted
The liveness probe in Kubernetes periodically checks the health of a container by executing the specified command. When the file /tmp/healthy is deleted, the 'cat /tmp/healthy' command fails (returns non-zero exit code), causing the liveness probe to fail. After consecutive failures (default threshold is 3), kubelet restarts the container to attempt recovery, which is the expected behavior for a failing liveness probe.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The pod will continue running because the liveness probe only checks at startup
Why it's wrong here
Liveness probes are not a startup-only check; they run continuously at a configured period (default every 10 seconds) after the container starts. Each execution of `cat /tmp/healthy` must return exit code 0 to be declared healthy, so if the file is missing the probe keeps failing and the kubelet restarts the container, not ignores the failure.
- ✗
The pod will be deleted and recreated by the Deployment
Why it's wrong here
When a liveness probe fails, the kubelet restarts the container in-place within the existing Pod object; it does not delete or recreate the Pod. In a Deployment, the Pod would only be replaced if something removed it or if the Deployment itself scaled or rolled out a new revision, which is not how probe failures are handled. The container's restart counter increments while the Pod remains at the same UID.
- ✗
The pod will be marked as NotReady and removed from the Service
Why it's wrong here
Removing a Pod from a Service's Endpoints is the job of a readiness probe, not a liveness probe. A liveness probe failure causes a container restart, but it does not change the Pod's Ready condition; the Service will continue to route traffic to it (though traffic will fail while the container is restarting). Only a failing readiness probe marks the Pod NotReady and removes its address from the Endpoints.
- ✓
The liveness probe will fail and the container will be restarted
Why this is correct
The liveness probe runs `cat /tmp/healthy` inside the container; if the file does not exist, the command exits non-zero, so the probe is marked failed and the kubelet kills and restarts the container according to the Pod's restartPolicy (usually Always). This restart is performed in-place by the kubelet and is exactly the designed response to a liveness probe failure.
Go deeper
Related to this question
About these practice questions
Courseiva writes every CKAD question from scratch — 826 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CKAD practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CKAD exam.