Courseiva
TroubleshootinghardMultiple ChoiceObjective-mapped

CKA Troubleshooting Practice Question

You are troubleshooting a pod that is in 'CrashLoopBackOff' state. You run 'kubectl logs mypod' and get no output. You then run 'kubectl logs mypod --previous' and see an error: 'Error: failed to start container: context deadline exceeded'. What is the MOST likely cause?

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 container runtime is unable to start the container due to a timeout

The error 'context deadline exceeded' indicates that the container runtime failed to start the container within the allowed time. This can happen if the container image takes too long to pull, the runtime is slow, or there is a network issue. Option A would produce an 'executable file not found' error. Option B would result in the application crashing, but logs would show output before the crash. Option C would also show a similar error to A. Therefore, D is the most likely 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 image is missing the entrypoint

    Why it's wrong here

    A missing ENTRYPOINT would cause the container runtime to fail immediately with an OCI/exec error such as 'executable file not found in $PATH' or 'exec format error' as it tries to launch the configured command. This is a startup-time command resolution failure, not a deadline exceeded waiting for the runtime to act. Such errors surface in the Events section of 'kubectl describe' as 'Failed to start container' with an immediate exec failure, and they would not produce 'context deadline exceeded'.

  • The application inside the container is crashing immediately

    Why it's wrong here

    An application that crashes immediately typically writes stack traces, panic output, or other application-level error messages to its stdout/stderr logs, and those messages are visible with 'kubectl logs' or 'kubectl logs --previous'. In this scenario, the reported error 'context deadline exceeded' is a container runtime/CRI-layer message, not an application error. The presence of this runtime error in events or describe output distinguishes the failure from an app crash, which would instead show a nonzero exit code and application-generated log output.

  • The container command is incorrectly specified

    Why it's wrong here

    An incorrectly specified container command causes the runtime to fail while locating or executing the binary, producing errors such as 'executable file not found in $PATH', 'no such file or directory', or 'OCI runtime exec failed: exec: ...'. These failures are deterministic and immediate when the runtime attempts to start the container process. A 'context deadline exceeded' error, by contrast, arises when the runtime operation itself times out before the container process can be created, which is a different failure stage from command resolution.

  • The container runtime is unable to start the container due to a timeout

    Why this is correct

    The 'context deadline exceeded' error indicates that the kubelet's or CRI runtime's operation to create or start the container exceeded its deadline before completing successfully. This is typical when the container runtime hangs during image pull, storage setup, runc init, or other pre-start steps, and after repeated failures the kubelet marks the pod as CrashLoopBackOff. It is a runtime-level timeout rather than an application or command issue, so inspecting the container runtime service and underlying node resources is the appropriate debugging path.

About these practice questions

One of 302 original CKA practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.