kubernetes-yaml/learn/learn-kubernetes-master/kiamol/ch17/user-groups/bindings/test-group.yaml

25 lines
486 B
YAML
Raw Normal View History

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: logs-reader
labels:
kiamol: ch17
rules:
- apiGroups: [""]
resources: ["pods", "pods/log"]
verbs: ["get"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: test-logs-cluster
labels:
kiamol: ch17
subjects:
- kind: Group
name: test
apiGroup: rbac.authorization.k8s.io
roleRef:
kind: ClusterRole
name: logs-reader
apiGroup: rbac.authorization.k8s.io