CKAD Application Design and Build Practice Question
You run the following command: 'kubectl run nginx --image=nginx --restart=Never'. What Kubernetes resource is created?
⚠ Common exam trap
Candidates often assume `kubectl run` always creates a Deployment by default, but the `--restart=Never` flag changes the behavior to create a Pod, and they may confuse the restart policy with the resource type, leading them to incorrectly select Job or Deployment.
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
✓
Pod
The `kubectl run nginx --image=nginx --restart=Never` command creates a Pod directly, because the `--restart=Never` flag sets the restart policy to Never, which instructs Kubernetes to run the container as a standalone Pod rather than wrapping it in a higher-level controller like a Deployment or Job. The `kubectl run` command, when used without a controller flag, defaults to creating a Pod when `--restart=Never` is specified, as per the Kubernetes API behavior.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
CronJob
Why it's wrong here
A CronJob is only created when the --schedule flag is provided to kubectl run, which configures a recurring job. Since the given command lacks --schedule, kubectl run has no scheduling information to create a CronJob. CronJobs are meant for periodic tasks, and an imperative one-off run without a schedule cannot be interpreted as a CronJob.
- ✗
Deployment
Why it's wrong here
With kubectl run, the default restart policy is Always, which yields a Deployment that maintains a set of replicas via a ReplicaSet. However, when --restart=Never is specified, the command bypasses the Deployment controller because a Deployment requires the restart policy to be Always to keep the desired number of Pods running. Thus, the explicit Never restart policy makes Deployment an incorrect classification.
- ✗
Job
Why it's wrong here
kubectl run creates a Job when --restart=OnFailure is used, because a Job tracks a Pod to successful completion and can retry on failure according to the restart policy. The command here uses --restart=Never, which instructs the kubelet to not restart the container, so no Job controller is involved to monitor or restart it. A Job would be the appropriate resource only with the OnFailure restart policy, not with Never.
- ✓
Pod
Why this is correct
When --restart=Never is specified, kubectl run creates a standalone Pod directly rather than handing the Pod to a controller. This Pod is the smallest deployable unit and has a restart policy of Never, meaning if its container exits, the kubelet will not restart it and no higher-level controller will recreate it. Therefore the resulting object is exactly a Pod.
Go deeper
Related to this question
About these practice questions
This CKAD question is part of Courseiva's 826-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 CKAD 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 CKAD exam.