apiVersion: v1
kind: serviceAccount
metadata:
name: events-sa
namespace: default (1)
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: event-watcher
namespace: default (1)
rules:
- apiGroups:
- ""
resources:
- events
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: k8s-ra-event-watcher
namespace: default (1)
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: event-watcher
subjects:
- kind: serviceAccount
name: events-sa
namespace: default (1)