Courseiva
Application Design and BuildeasyMultiple ChoiceObjective-mapped

CKAD Application Design and Build Practice Question

Which kubectl command creates a pod named 'nginx' from the image 'nginx:latest'?

⚠ Common exam trap

The CKAD exam often tests the misconception that `kubectl run` always creates a Deployment, but in recent Kubernetes versions (1.18+) the default behavior creates a Pod directly. Additionally, both `kubectl run nginx --image=nginx:latest` and `kubectl run nginx --image=nginx:latest --restart=Never` create a Pod, so either is acceptable. Candidates may incorrectly assume only one is correct.

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

kubectl run nginx --image=nginx:latest

`kubectl run nginx --image=nginx:latest` creates a Pod named 'nginx' by default in recent Kubernetes versions (1.18+). Option C is also correct: adding `--restart=Never` explicitly creates a Pod and is a common practice to ensure a Pod is created rather than a Deployment. Option B is wrong because `kubectl apply -f` requires a YAML file. Option D is wrong because `kubectl create pod` is not a valid subcommand; the correct imperative command is `kubectl run`.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • kubectl run nginx --image=nginx:latest

    Why this is correct

    Correct: This command creates a Pod named 'nginx' from the specified image in recent Kubernetes versions.

  • kubectl apply -f pod.yaml

    Why it's wrong here

    Wrong: `kubectl apply -f` requires a pre-existing YAML file; it does not create a Pod directly from an image name.

  • kubectl run nginx --image=nginx:latest --restart=Never

    Why this is correct

    Correct: `--restart=Never` ensures a Pod is created, and this command produces the same result as option A.

  • kubectl create pod nginx --image=nginx:latest

    Why it's wrong here

    Wrong: `kubectl create pod` is not a valid subcommand; the correct imperative command is `kubectl run`.

About these practice questions

Courseiva writes every CKAD question from scratch — 160 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 →

How Courseiva writes practice questions · Editorial policy

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.