kubernetes-yaml/learn/learn-kubernetes-master/kiamol/ch17/user-groups/service-accounts/role-bindings/sre-sa-group.yaml

28 lines
633 B
YAML

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: sre-sa-view-cluster
labels:
kiamol: ch17
subjects:
- kind: Group
name: system:serviceaccounts:kiamol-authn-sre
apiGroup: rbac.authorization.k8s.io
roleRef:
kind: ClusterRole
name: view
apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: sre-sa-edit-ch17
namespace: kiamol-ch17
subjects:
- kind: Group
name: system:serviceaccounts:kiamol-authn-sre
apiGroup: rbac.authorization.k8s.io
roleRef:
kind: ClusterRole
name: edit
apiGroup: rbac.authorization.k8s.io