KCNA Cloud Native Architecture Practice Question
Exhibit
Refer to the exhibit. ``` $ kubectl get pods -n production NAME READY STATUS RESTARTS AGE api-7d4f8b8c6-abc12 1/1 Running 0 5m api-7d4f8b8c6-xyz78 1/1 Running 0 5m web-9f6c8d7e5-lmn34 1/1 Running 3 10m web-9f6c8d7e5-pqr56 1/1 Running 0 10m $ kubectl logs web-9f6c8d7e5-lmn34 Error: failed to connect to database at 10.0.0.1:3306 $ kubectl describe pod web-9f6c8d7e5-lmn34 | grep -A5 Events Events: Type Reason Age From Message ---- ------ ---- ---- ------- Warning Unhealthy 2m kubelet Liveness probe failed: HTTP probe failed with statuscode: 503 Normal Killing 2m kubelet Container failed liveness probe, will be restarted Normal Pulling 2m kubelet Pulling image "webapp:2.0" ```
The exhibit shows pod status and logs. The web pod lmn34 has restarted 3 times. What is the root cause of the liveness probe failure?
⚠ Common exam trap
CNCF often tests the distinction between liveness and readiness probes, where candidates confuse readiness probe misconfiguration (which only affects traffic routing) with liveness probe failures (which cause container restarts).
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 database service is not reachable, causing the application to fail its health check.
The liveness probe failure is caused by the database service being unreachable, which prevents the application from completing its health check. When the database is down or network connectivity is lost, the application's health endpoint returns a non-200 status code, causing Kubernetes to restart the container. The 3 restarts indicate repeated probe failures, and the logs show connection errors to the database, confirming this as the root cause.
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 container is hitting a memory limit and being OOMKilled.
Why it's wrong here
OOMKilled would show different event messages and pod status.
- ✗
A network policy is blocking traffic to the database.
Why it's wrong here
Network policy would cause connection timeout, but the log says 'failed to connect' without timeout; also not directly causing liveness failure.
- ✓
The database service is not reachable, causing the application to fail its health check.
Why this is correct
The log indicates a database connection failure, and the liveness probe returns 503, causing restarts.
- ✗
The readiness probe is misconfigured and not allowing traffic.
Why it's wrong here
Readiness probe affects service endpoints, not liveness restarts.
Go deeper
Related to this question
About these practice questions
Courseiva writes every KCNA question from scratch — 833 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.