apiVersion: v1
kind: ServiceAccount
metadata:
  name: topology-scheduler
  namespace: kube-system

---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: topology-scheduler
rules:
- apiGroups: [""]
  resources: ["pods"]
  verbs: ["get", "watch", "list", "update", "patch"]
- apiGroups: [""]
  resources: ["namespaces"]
  verbs: ["get", "watch", "list"]
- apiGroups: [""]
  resources: ["nodes"]
  verbs: ["get", "list", "watch", "update", "patch"]

---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: topology-scheduler
subjects:
- kind: ServiceAccount
  name: topology-scheduler
  namespace: kube-system
roleRef:
  kind: ClusterRole
  name: topology-scheduler
  apiGroup: rbac.authorization.k8s.io
