-
Notifications
You must be signed in to change notification settings - Fork 10
/
kubectl_run_k1spy.yaml
47 lines (47 loc) · 1.08 KB
/
kubectl_run_k1spy.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: v1
kind: ServiceAccount
metadata:
name: k1spy-sa
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: k1spy-get-list
rules:
- apiGroups: [""]
resources: ["pods","nodes","namespaces","services","endpoints","persistentvolumes","persistentvolumeclaims"]
verbs: ["get","list","watch"]
- apiGroups: ["apps"]
resources: ["deployments","replicasets","daemonsets","statefulsets"]
verbs: ["get","list","watch"]
- apiGroups: ["batch"]
resources: ["jobs","cronjobs"]
verbs: ["get","list","watch"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: k1spy-get-list
subjects:
- kind: ServiceAccount
name: k1spy-sa
namespace: default
roleRef:
kind: ClusterRole
name: k1spy-get-list
apiGroup: rbac.authorization.k8s.io
---
apiVersion: v1
kind: Pod
metadata:
labels:
run: k1spy
name: k1spy
spec:
serviceAccountName: k1spy-sa
containers:
- name: k1spy
image: mjbright/k1spy
imagePullPolicy: Always
#command: ['/usr/bin/python3', './k1s.py', 'po,no,deploy']
#command: ['/bin/sleep', '3600']