我试图在我的GKE集群中使用RBAC策略,所以我需要对一个组执行视图角色,对另一个组执行管理角色。我有两个组为RBAC策略创建了abc@example.com和def@example.com,我可以在def@example.com文件中直接引用它们,比如:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: view-role
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: view
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: Group
name: "abc@example.com"还是我应该启用"Google“并创建一个组”Groups @YOUR“(https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control#rolebinding)并将上述组添加到其中,然后在GKE集群中创建RBAC规则?
我创建了上面的ClusterRoleBinding什么都没有更改(没有启用"Google for RBAC"),请让我知道如何将RBAC访问应用到GKE集群中的一个组?
发布于 2021-09-23 12:31:33
我的假设是,您已经创建/设置了您的google组。如果没有,请查看到为RBAC配置Google组的链接,您必须更新集群才能启用RBAC功能。
若要将现有集群更新为启用Groups的RBAC功能,请在Google控制台中执行以下步骤:
https://stackoverflow.com/questions/69273383
复制相似问题