我已通过 kubernetes 集群身份验证,如何查看附加到我当前帐户的 RBAC 角色和组?
最佳答案
找到更好的工具
这个工具看起来比 rakkess 好得多
正是我正在寻找的东西
https://github.com/reactiveops/rbac-lookup
在最简单的用例中,rbac-lookup 将返回任何匹配的用户、服务帐户或组以及为其指定的角色。
rbac-lookup rob
SUBJECT SCOPE ROLE
rob@example.com cluster-wide ClusterRole/view
rob@example.com nginx-ingress ClusterRole/edit
The wide output option includes the kind of subject along with the source role binding.
rbac-lookup ro --output wide
SUBJECT SCOPE ROLE SOURCE
User/rob@example.com cluster-wide ClusterRole/view ClusterRoleBinding/rob-cluster-view
User/rob@example.com nginx-ingress ClusterRole/edit RoleBinding/rob-edit
User/ron@example.com web ClusterRole/edit RoleBinding/ron-edit
ServiceAccount/rops infra ClusterRole/admin RoleBinding/rops-admin
关于kubernetes - 如何列出我当前的 RBAC 角色和所属组?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55019041/