apiVersion: v1 kind: ServiceAccount metadata: name: k8s-reboot-coordinator --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: k8s-reboot-coordinator rules: - apiGroups: - coordination.k8s.io resources: - leases verbs: - create - get - list - patch - watch --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: k8s-reboot-coordinator rules: - apiGroups: - '' resources: - nodes verbs: - get - list - patch - apiGroups: - '' resources: - pods verbs: - get - list - watch - apiGroups: - '' resources: - pods/eviction verbs: - create --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: k8s-reboot-coordinator roleRef: apiGroup: rbac.authorization.k8s.io kind: Role name: k8s-reboot-coordinator subjects: - kind: ServiceAccount name: k8s-reboot-coordinator --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: k8s-reboot-coordinator roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: k8s-reboot-coordinator subjects: - kind: ServiceAccount name: k8s-reboot-coordinator namespace: default