forked from Yolean/kubernetes-kafka
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpod-labler.yml
39 lines (39 loc) · 865 Bytes
/
pod-labler.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# To see if init containers need RBAC:
#
# $ kubectl -n kafka logs kafka-2 -c init-config
# ...
# Error from server (Forbidden): pods "kafka-2" is forbidden: User "system:serviceaccount:kafka:default" cannot get pods in the namespace "kafka": Unknown user "system:serviceaccount:kafka:default"
#
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: pod-labler
namespace: kafka
labels:
origin: github.com_Yolean_kubernetes-kafka
rules:
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- update
- patch
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: kafka-pod-labler
namespace: kafka
labels:
origin: github.com_Yolean_kubernetes-kafka
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: pod-labler
subjects:
- kind: ServiceAccount
name: default
namespace: kafka