CKA Practice Question: Cluster Architecture, Installation and Configuration
A pod's YAML specifies 'restartPolicy: Never' and the container exits with code 0. What state will the pod be in?
⚠ Common exam trap
Many exam-takers confuse the 'Completed' status from kubectl get pods output (which is a human-readable shorthand) with the actual pod phase 'Succeeded', or they assume any exit means 'Failed' regardless of the exit code.
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
✓
Succeeded
When a pod's restartPolicy is set to 'Never' and its container exits with code 0 (indicating a successful termination), the pod transitions to the 'Succeeded' phase. This is because Kubernetes treats a zero exit code as a successful completion, and with restartPolicy: Never, no restart is attempted, leaving the pod in a terminal Succeeded state.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Completed
Why it's wrong here
"Completed" is not a valid value for the Pod's status.phase field. The Kubernetes API only defines Pending, Running, Succeeded, Failed, and Unknown as valid phases. When a container exits with code 0 under restartPolicy: Never, the kubelet marks the phase as Succeeded, not "Completed," so this label is incorrect.
- ✗
Failed
Why it's wrong here
A container exiting with code 0 is a successful completion, so with restartPolicy Never the pod reaches Succeeded, not Failed; Failed is reserved for non-zero exit codes. It is tempting because Never sounds like a terminal failure state, and it would be correct if the container had exited with a non-zero status.
- ✓
Succeeded
Why this is correct
"Succeeded" is the correct phase for a Pod whose containers all exit with status 0 and whose restartPolicy is Never or OnFailure. The kubelet detects the clean exit and updates status.phase to Succeeded, indicating the container ran to completion without errors. This matches the given pod definition exactly, making it the correct answer.
- ✗
Running
Why it's wrong here
"Running" is a transient phase that means at least one container is still executing or is in the process of starting or restarting. For a Pod with restartPolicy: Never, once the container exits, even with status 0, the phase immediately moves away from Running to a terminal phase. Because the container has already exited, the Running phase is impossible, so this option is wrong.
Go deeper
Related to this question
Learn chapter
Installing Kubernetes with kubeadm
Key term
Network Policies
A Kubernetes resource that controls how pods communicate with each other and with other network endpoints, acting as a firewall for pod-to-pod traffic.
Key term
Ingress Resources
Ingress Resources are Kubernetes API objects that manage external access to services inside a cluster, typically HTTP and HTTPS traffic, by defining rules for routing requests based on hostnames and paths.
About these practice questions
Courseiva writes every CKA question from scratch — 726 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 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.