KCNA Container Orchestration Practice Question
Which command is used to create a Deployment that runs an nginx container with 3 replicas?
⚠ Common exam trap
Test-takers frequently confuse `kubectl run` (which creates a pod, not a deployment with replicas) with `kubectl create deployment`, or they mistakenly think `kubectl scale` can create a deployment, when it only modifies an existing one.
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 create deployment nginx --image=nginx --replicas=3
`kubectl create deployment` is the standard Kubernetes command to create a Deployment resource, and the `--replicas=3` flag directly sets the desired replica count to 3. This command creates a Deployment that manages a ReplicaSet to ensure three nginx pods are running and maintained.
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 create pod nginx --image=nginx --replicas=3
Why it's wrong here
There is no 'kubectl create pod' command; pods are created via deployments or directly using run.
- ✗
kubectl run nginx --image=nginx --replicas=3
Why it's wrong here
kubectl run does not support --replicas; it creates a single pod.
- ✓
kubectl create deployment nginx --image=nginx --replicas=3
Why this is correct
This command creates a Deployment named nginx with the specified image and replicas.
- ✗
kubectl scale deployment nginx --replicas=3
Why it's wrong here
This command scales an existing deployment, but does not create one.
Go deeper
Related to this question
About these practice questions
This KCNA question is part of Courseiva's 833-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 KCNA 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 KCNA exam.