hardkubectl

Check whether a specific user has permission to list pods in a namespace

command

kubectl auth can-i list pods --namespace NAMESPACE --as USER

also accepted

kubectl auth can-ikubectl auth can-i list pods --namespace NAMESPACE --as

Command breakdown

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

kubectlauthcan-ilistpods--namespaceNAMESPACE--asUSER
FlagPurpose
--namespaceBoolean flag
--asBoolean flag

Test your recall — not just your reading.

Practice with interactive quiz →