Bird
0
0

Which of the following is the correct syntax to create a Pod named 'testpod' using the busybox image with kubectl?

easy📝 Syntax Q12 of 15
Kubernetes - Pods
Which of the following is the correct syntax to create a Pod named 'testpod' using the busybox image with kubectl?
Akubectl run testpod --image=busybox --restart=Never
Bkubectl create pod testpod --image=busybox
Ckubectl deploy testpod --image=busybox
Dkubectl pod create testpod --image=busybox
Step-by-Step Solution
Solution:
  1. Step 1: Identify the correct kubectl command for Pod creation

    The kubectl run command with --restart=Never creates a Pod directly.
  2. Step 2: Check each option's syntax

    kubectl create pod testpod --image=busybox uses kubectl create pod which is invalid. kubectl deploy testpod --image=busybox uses kubectl deploy which is not a kubectl command. kubectl pod create testpod --image=busybox uses kubectl pod create which is invalid. Only kubectl run testpod --image=busybox --restart=Never is correct syntax.
  3. Final Answer:

    kubectl run testpod --image=busybox --restart=Never -> Option A
  4. Quick Check:

    kubectl run + --restart=Never = Pod creation [OK]
Quick Trick: Use 'kubectl run name --image=img --restart=Never' for Pod creation [OK]
Common Mistakes:
  • Using 'kubectl create pod' which is invalid
  • Confusing 'deploy' with 'run'
  • Omitting --restart=Never to create a Pod

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes