Bird
0
0

Which of the following kubectl commands is correctly written to list all pods in the default namespace?

easy📝 Syntax Q12 of 15
Kubernetes - kubectl Essential Commands
Which of the following kubectl commands is correctly written to list all pods in the default namespace?
Akubectl get pods
Bkubectl list pods
Ckubectl show pods
Dkubectl pods get
Step-by-Step Solution
Solution:
  1. Step 1: Recall the correct command syntax

    The correct command to list pods is kubectl get pods.
  2. Step 2: Identify incorrect options

    Commands like list, show, or reversed order are invalid in kubectl.
  3. Final Answer:

    kubectl get pods -> Option A
  4. Quick Check:

    List pods = kubectl get pods [OK]
Quick Trick: Use 'kubectl get' to list resources [OK]
Common Mistakes:
  • Using 'list' or 'show' instead of 'get'
  • Reversing command order
  • Omitting 'get' keyword

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes