-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathrbac.yaml
47 lines (46 loc) · 864 Bytes
/
rbac.yaml
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
40
41
42
43
44
45
46
47
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: krelay
rules:
- apiGroups:
- ""
resources:
- pods
- pods/portforward
verbs:
# create the krelay-server pod and forward local port to it
- create
# watch the krelay-server pod
- watch
# clean the krelay-server pod
- delete
# The following permissions is only requried if you want to forward the local port to the respective objects.
- apiGroups:
- ""
resources:
- services
- pods
verbs:
- get
- apiGroups:
- apps
resources:
- replicasets
- deployments
- statefulsets
- daemonsets
verbs:
- get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: krelay
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: krelay
subjects:
- kind: User
name: <Please fill in your username here>