apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: <SERVICEACCOUNT>
namespace: <NAMESPACE>
rules:
- verbs:
- get
- list
apiGroups:
- ''
resources:
- namespaces
- pods/log
- events
- verbs:
- create
- delete
- get
- list
- patch
- update
- watch
apiGroups:
- ''
resources:
- configmaps
- secrets
- pods
- persistentvolumeclaims
- endpoints
- services
- verbs:
- create
- delete
- get
- list
- patch
- update
- watch
apiGroups:
- apps
resources:
- deployments
- replicasets
- statefulsets
- verbs:
- create
- delete
- get
- list
- patch
- update
- watch
apiGroups:
- batch
resources:
- jobs
- cronjobs
- verbs:
- create
- delete
- get
- list
- patch
- update
- watch
apiGroups:
- extensions
resources:
- deployments
- replicasets
- verbs:
- create
- delete
- get
- list
- patch
- update
- watch
apiGroups:
- networking.k8s.io
resources:
- ingresses
- verbs:
- create
- delete
- get
- list
- patch
- update
- watch
apiGroups:
- route.openshift.io
resources:
- routes
- routes/custom-host
- verbs:
- get
- list
apiGroups:
- ''
resources:
- serviceaccounts
- roles
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: <SERVICEACCOUNT>
namespace: <NAMESPACE>
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: <SERVICEACCOUNT>
subjects:
- kind: ServiceAccount
name: <SERVICEACCOUNT>