apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: kured
rules:
# Allow kured to grab it's lock
- apiGroups:
  - extensions
  resources:
  - daemonsets
  verbs:
  - get
  - update
# Allow kured to cordon and uncordon nodes
- apiGroups:
  - ""
  resources:
  - nodes
  verbs:
  - get
  - update
# Allow kured to drain nodes
- apiGroups:
  - ""
  resources:
  - pods
  verbs:
  - get
  - list
  - delete
- apiGroups:
  - apps
  resources:
  - statefulsets
  verbs:
  - get
- apiGroups:
  - extensions
  resources:
  - daemonsets
  - replicasets
  verbs:
  - get
- apiGroups:
  - batch
  resources:
  - jobs
  verbs:
  - get
- apiGroups:
  - ""
  resources:
  - pods/eviction
  verbs:
  - create