KCNA Kubernetes Fundamentals Practice Question
What is the primary purpose of a liveness probe in a container?
⚠ Common exam trap
Many exam-takers confuse liveness probes with readiness probes, often selecting option C because both involve health checks, but liveness probes manage container lifecycle while readiness probes manage traffic routing.
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
✓
To check if the container is still alive; restart if not
The primary purpose of a liveness probe is to determine whether a container is still running and healthy. If the probe fails, the kubelet kills the container and restarts it according to the pod's restart policy, ensuring self-healing. This is distinct from readiness probes, which control traffic routing, and resource checks, which are handled by metrics servers or cAdvisor.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
To check resource usage like CPU and memory
Why it's wrong here
CPU and memory metrics come from the metrics pipeline, not probes; a liveness probe issues a kubelet-executed check (HTTP, TCP or command) and restarts the container on failure. Resource monitoring is the job of metrics-server and Horizontal Pod Autoscaler, which scale or alert rather than restart a wedged process.
- ✓
To check if the container is still alive; restart if not
Why this is correct
A liveness probe periodically tests whether the container process is still responsive; on failure, kubelet restarts the container according to its restart policy. This directly matches the stem's requirement to detect a dead container and restart it.
- ✗
To check if the container is ready to serve traffic
Why it's wrong here
Readiness probes, not liveness probes, gate Service endpoint membership so traffic only reaches containers able to serve it. A liveness probe instead restarts a container whose process is deadlocked. Readiness is the right choice when a container must be temporarily withdrawn from load balancing without being killed.
- ✗
To check if the pod is scheduled on the correct node
Why it's wrong here
Liveness probes restart containers that are running but deadlocked; they do not verify node scheduling, which the scheduler and node affinity rules handle. It is tempting because probes do report pod health, and a readiness probe would be correct for gating traffic. Node placement is decided at scheduling time, not by probes.
Go deeper
Related to this question
About these practice questions
Courseiva writes every KCNA question from scratch — 930 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 KCNA 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 KCNA exam.