Bird
0
0

What will the command kubectl get pods -n default show?

medium📝 Command Output Q13 of 15
Kubernetes - Namespaces
What will the command kubectl get pods -n default show?
APods in the default namespace
BAll pods in all namespaces
CPods in the kube-system namespace
DNo pods, because default namespace is empty
Step-by-Step Solution
Solution:
  1. Step 1: Understand the command syntax

    kubectl get pods -n default lists pods in the namespace named default.
  2. Step 2: Identify the namespace targeted

    The -n default flag limits output to the default namespace only.
  3. Final Answer:

    Pods in the default namespace -> Option A
  4. Quick Check:

    kubectl -n default shows default pods [OK]
Quick Trick: -n specifies namespace for kubectl commands [OK]
Common Mistakes:
  • Thinking it shows pods from all namespaces
  • Confusing default with kube-system
  • Assuming default namespace is always empty

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes