easykubectl

List all pods within a specific namespace using the -n flag

command

kubectl get pods -n NAMESPACE

also accepted

kubectl get pods -nkubectl get po -n NAMESPACEkubectl get pods --namespace NAMESPACEkubectl get po -n

Command breakdown

Part of the Kubernetes CLI (kubectl) — Namespaces category.

kubectlgetpods-nNAMESPACE
FlagPurpose
-nBoolean flag

Test your recall — not just your reading.

Practice with interactive quiz →