CKA Workloads & Scheduling Practice Question
A Pod in a Deployment is CrashLoopBackOff. 'kubectl logs' shows the application exits with code 1 after printing one line. The Pod has a liveness probe that checks an HTTP endpoint. What should be checked first?
⚠ Common exam trap
The trap here is that candidates often focus on the liveness probe configuration (options B and C) because the question mentions it, but the immediate cause is the application crash itself, which must be diagnosed first via logs.
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
✓
Check the application logs and configuration that causes the exit code 1.
The application exits with code 1 after printing one line, which indicates a runtime error in the application itself. The liveness probe only restarts the container after the application has already failed; it does not prevent the initial crash. Therefore, the first step is to examine the application logs and configuration to understand why the process exits with code 1, as this is the root cause of the CrashLoopBackOff.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Check the application logs and configuration that causes the exit code 1.
Why this is correct
When a container terminates with exit code 1, it indicates an application-level failure or configuration error rather than an external infrastructure issue. Inspecting the container logs using `kubectl logs` is the primary troubleshooting step to identify runtime exceptions, missing environment variables, or syntax errors causing the process to crash immediately upon startup.
- ✗
Check if the liveness probe's initialDelaySeconds is too short.
Why it's wrong here
While an aggressive liveness probe can cause a container to restart if it fails to respond in time, it would typically result in a container exit code of 137 (SIGKILL) or 143 (SIGTERM) initiated by the kubelet. An exit code of 1 indicates the application process terminated on its own internal logic before any probe-induced restarts could occur.
- ✗
Check if the liveness probe endpoint is correctly configured.
Why it's wrong here
Misconfigured liveness probe endpoints lead to failing health checks and subsequent container restarts, but this cycle only begins after the container successfully starts and survives its initial startup phase. Since the application is exiting immediately with code 1, the process terminates before the kubelet even attempts to evaluate the liveness probe endpoint.
- ✗
Check if the container has insufficient memory limits.
Why it's wrong here
If a container exceeds its defined memory limits, the Linux kernel Out-Of-Memory (OOM) killer terminates the process, resulting in an exit code of 137 and an `OOMKilled` status in the pod description. An exit code of 1 clearly points to an internal application crash or unhandled exception, not an external resource enforcement action by the container runtime.
Go deeper
Related to this question
Key term
Pod Failure Troubleshooting
Pod failure troubleshooting is the process of identifying and resolving issues that cause Kubernetes pods to crash, restart, or become unavailable.
Key term
Log Analysis
Log analysis is the process of reviewing and interpreting system-generated records to understand what happened in an application or infrastructure.
About these practice questions
This CKA question is part of Courseiva's 726-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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 CKA 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 CKA exam.