Options (1)
-n, --namespacebooleanCheck if the current user can perform all actions on all resources in a specific namespace
Example:
kubectl auth can-i '*' '*' {{[-n|--namespace]}} {{namespace}}Examples (4)
Check if the current user can perform all actions on all resources in a specific namespace
kubectl auth can-i '*' '*' [-n|--namespace] namespaceCheck if the current user can perform a specific verb on a specific resource
kubectl auth can-i verb resource [-n|--namespace] namespaceCheck if a specific user or service account can perform an action on a resource
kubectl auth can-i verb resource [-n|--namespace] namespace --as user_or_saList all actions the current user is allowed to perform in a namespace
kubectl auth can-i --list [-n|--namespace] namespacemade by @shridhargupta | data from tldr-pages