Bird
0
0

Which of the following is the correct syntax to create a deployment using kubectl create?

easy📝 Syntax Q12 of 15
Kubernetes - kubectl Essential Commands
Which of the following is the correct syntax to create a deployment using kubectl create?
Akubectl create deployment myapp --image=nginx
Bkubectl create pod myapp --image=nginx
Ckubectl apply deployment myapp --image=nginx
Dkubectl apply -f deployment.yaml
Step-by-Step Solution
Solution:
  1. Step 1: Identify kubectl create syntax for deployment

    The command kubectl create deployment myapp --image=nginx creates a deployment named myapp with the nginx image.
  2. Step 2: Differentiate from kubectl apply syntax

    kubectl apply uses the -f flag with a file, not direct deployment creation.
  3. Final Answer:

    kubectl create deployment myapp --image=nginx -> Option A
  4. Quick Check:

    create deployment uses direct command, apply uses files [OK]
Quick Trick: Use 'create deployment' with image flag, apply uses files [OK]
Common Mistakes:
  • Using apply syntax with create command
  • Mixing file flag with create deployment
  • Confusing create and apply commands

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes