---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: k8s-spot-termination-handler
rules:
  # For draining nodes
  - apiGroups:
      - ""
    resources:
      - nodes
    verbs:
      - get
      - update
  - apiGroups:
      - ""
    resources:
      - pods
    verbs:
      - list
  - apiGroups:
      - extensions
    resources:
      - replicasets
      - daemonsets
    verbs:
      - get
  - apiGroups:
      - ""
    resources:
      - pods/eviction
    verbs:
      - create
