k3s-configs/infra/k9s/rbac.yaml

36 lines
671 B
YAML

---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: k9s-reader
rules:
- apiGroups: [""]
resources: ["*"]
verbs: ["get", "list", "watch"]
- apiGroups: ["apps"]
resources: ["*"]
verbs: ["get", "list", "watch"]
- apiGroups: ["batch"]
resources: ["*"]
verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: k9s
subjects:
- kind: ServiceAccount
name: k9s-sa
namespace: k9s
roleRef:
kind: ClusterRole
name: k9s-reader
apiGroup: rbac.authorization.k8s.io
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: k9s-sa
namespace: k9s