-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathk8s-example.yaml
57 lines (57 loc) · 994 Bytes
/
k8s-example.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
48
49
50
51
52
53
54
55
56
57
---
apiVersion: v1
kind: Service
metadata:
name: kcount
spec:
selector:
app: kcount
ports:
- protocol: TCP
port: 80
targetPort: 2112
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: kcount
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: kcount-view
subjects:
- kind: ServiceAccount
name: kcount
roleRef:
kind: ClusterRole
name: view # one of the predefined ClusterRoles
apiGroup: rbac.authorization.k8s.io
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: kcount
labels:
app: kcount
spec:
replicas: 1
selector:
matchLabels:
app: kcount
template:
metadata:
labels:
app: kcount
spec:
containers:
- name: kcount
image: ghcr.io/pan-net-security/kcount:latest
resources:
limits:
memory: "128Mi" # 128 MiB
cpu: "500m" # 0.5 CPU
args:
- -a
- -d
serviceAccountName: kcount