有什么办法可以列出openshift中默认组中的用户?

时间:2019-06-17 07:34:04

标签: openshift usergroups

我想在openshift中按默认组列出用户,例如system:authenticated,system:authenticated:oauth,system:unauthenticated。

我得到了this link 找出默认组和角色,但无助地列出这些组中的用户。所以我想知道有什么方法可以列出openshift集群吗?

" oc get group "不会列出默认的组和用户。

1 个答案:

答案 0 :(得分:1)

您可以按照以下方式验证当前角色绑定。 有关更多详细信息,请参见Viewing cluster role bindings

$ oc describe clusterrolebinding.rbac

它向您显示与特定组和用户的角色绑定。 例如,允许basic-userssystem:authenticated个组。

Name:       basic-users
Labels:     <none>
Annotations:    rbac.authorization.kubernetes.io/autoupdate=true
Role:
  Kind: ClusterRole
  Name: basic-user
Subjects:
  Kind  Name            Namespace
  ----  ----            ---------
  Group system:authenticated

但是有些角色作为本地角色绑定授予用户,那么您还需要用户$ oc describe rolebinding.rbac

Name:       admin
Labels:     <none>
Annotations:    <none>
Role:
  Kind: ClusterRole
  Name: admin
Subjects:
  Kind  Name    Namespace
  ----  ----    ---------
  User  joe
相关问题