apiVersion: v1
kind: ServiceAccount
metadata:
  name: k8s-operator
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: k8s-operator-operator-cluster-role
rules:
  - apiGroups: [""]
    resources: ["pods", "events"] 
    verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: k8s-operator-cluster-role-binding
subjects:
  - kind: ServiceAccount
    name: k8s-operator-svc-account
roleRef:
  kind: ClusterRole
  name: k8s-operator-cluster-role
  apiGroup: rbac.authorization.k8s.io