hardkubectl

Check whether user bob can delete deployments in the staging namespace

command

kubectl auth can-i delete deployments --as=bob -n staging

also accepted

kubectl auth can-i delete deployments --askubectl auth can-i delete deployments --as=bob

Command breakdown

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

kubectlauthcan-ideletedeployments--as=bob-nstaging
FlagPurpose
--asSet to: bob
-nBoolean flag

Test your recall — not just your reading.

Practice with interactive quiz →