This KCNA practice question tests your understanding of cloud native architecture. Examine the command output carefully: the correct answer depends on what the output actually shows, not on general recall alone. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
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?
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"
```
A
The container is hitting a memory limit and being OOMKilled.
Why wrong: OOMKilled would show different event messages and pod status.
B
A network policy is blocking traffic to the database.
Why wrong: Network policy would cause connection timeout, but the log says 'failed to connect' without timeout; also not directly causing liveness failure.
C
The database service is not reachable, causing the application to fail its health check.
The log indicates a database connection failure, and the liveness probe returns 503, causing restarts.
D
The readiness probe is misconfigured and not allowing traffic.
Why wrong: Readiness probe affects service endpoints, not liveness restarts.
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.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
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.
Related concept
Read the scenario before looking for a memorised answer.
✗
The readiness probe is misconfigured and not allowing traffic.
Why it's wrong here
Readiness probe affects service endpoints, not liveness restarts.
Common exam traps
Common exam trap: answer the scenario, not the keyword
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).
Trap categories for this question
Command / output trap
OOMKilled would show different event messages and pod status.
Detailed technical explanation
How to think about this question
Kubernetes liveness probes use HTTP GET, TCP socket, or exec commands to check container health; a failing probe triggers a restart by the kubelet based on the `failureThreshold` and `periodSeconds` settings. In this scenario, the application's health check likely queries the database, and when the database service DNS resolves but TCP connection fails (e.g., connection refused or timeout), the probe returns an error. Real-world issues include misconfigured service DNS, database pod crashes, or network policies that inadvertently block traffic on the database port (e.g., 3306 for MySQL).
KKey Concepts to Remember
Read the scenario before looking for a memorised answer.
Find the constraint that changes the correct option.
Eliminate answers that are true in general but not in this case.
TExam Day Tips
→Watch for words such as best, first, most likely and least administrative effort.
→Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A practitioner preparing for the KCNA exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.
Related glossary terms
Concepts from this question explained
These glossary pages explain the core terms tested in this KCNA question in full detail.
Cloud Native Architecture — This question tests Cloud Native Architecture — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: 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.
What should I do if I get this KCNA question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
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.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.