apiVersion: v1
kind: ServiceAccount
metadata:
  name: k8s-operator
  namespace: poc

---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  namespace: poc
  name: k8s-operator
rules:
- apiGroups: [""]
  resources: ["pods"]
  verbs: ["get", "watch", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: read-pods
  namespace: poc
subjects:
- kind: ServiceAccount
  name: k8s-operator
  namespace: poc
roleRef:
  kind: Role
  name: k8s-operator
  apiGroup: rbac.authorization.k8s.io