集群角色绑定(ClusterRoleBinding)
# ClusterRoleBinding 常用配置项
# 1ClusterRoleBinding示例
和角色绑定基本一致,但是 集群角色绑定 会在所有命名空间中生效。
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: cbind1
subjects:
- kind: User
name: john
apiGroup: rbac.authorization.k8s.io
roleRef:
kind: ClusterRole
name: pod-reader
apiGroup: rbac.authorization.k8s.io
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
编辑 (opens new window)