kubectl auth
Inspect access permissions in a Kubernetes cluster. More information: https://kubernetes.io/docs/reference/kubectl/generated/kubectl_auth/.
- Check if the current user can perform all actions on all resources in a specific namespace:
kubectl auth can-i '*' '*'
- Check if the current user can perform a specific verb on a specific resource:
kubectl auth can-i
- Check if a specific user or service account can perform an action on a resource:
kubectl auth can-i --as
- List all actions the current user is allowed to perform in a namespace:
kubectl auth can-i --list
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
