CmdID

CmdID / Commands

kubectl-auth

Inspect access permissions in a Kubernetes cluster. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Check if the current user can perform all actions on all resources in a specific namespace

kubectl auth can-i '*' '*' --namespace namespaceIdentify
--namespaceIf present, the namespace scope for this CLI request kubectl reference

Check if the current user can perform a specific verb on a specific resource

kubectl auth can-i verb resource --namespace namespaceIdentify
--namespaceIf present, the namespace scope for this CLI request kubectl reference

Check if a specific user or service account can perform an action on a resource

kubectl auth can-i verb resource --namespace namespace --as user_or_saIdentify
--namespaceIf present, the namespace scope for this CLI request kubectl reference
--asUsername to impersonate for the operation. kubectl reference

List all actions the current user is allowed to perform in a namespace

kubectl auth can-i --list --namespace namespaceIdentify
--listIf true, prints all allowed actions. kubectl reference
--namespaceIf present, the namespace scope for this CLI request kubectl reference