deployment/rbac.yml
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: spot-termination-notice
labels:
app: spot-termination-notice
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app: spot-termination-notice
name: spot-termination-notice
rules:
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- watch
- list
- apiGroups:
- ""
resources:
- deployments
- replicaset
verbs:
- get
- watch
- list
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
app: spot-termination-notice
name: spot-termination-notice
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: spot-termination-notice
subjects:
- kind: ServiceAccount
name: spot-termination-notice
namespace: default