Skip to content

Commit a1eddc1

Browse files
committed
first vflow k8s deployment config
1 parent b31cecb commit a1eddc1

File tree

1 file changed

+84
-0
lines changed

1 file changed

+84
-0
lines changed

kubernetes/deploy.yaml

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: vflow
5+
labels:
6+
app: vflow
7+
spec:
8+
ports:
9+
- name: ipfix
10+
protocol: UDP
11+
port: 4739
12+
- name: sflow
13+
protocol: UDP
14+
port: 6343
15+
- name: netflowv5
16+
protocol: UDP
17+
port: 9996
18+
- name: netflowv9
19+
protocol: UDP
20+
port: 4729
21+
- name: stats
22+
protocol: TCP
23+
port: 8081
24+
selector:
25+
app: vflow
26+
---
27+
apiVersion: apps/v1
28+
kind: Deployment
29+
metadata:
30+
name: vflow-deployment
31+
spec:
32+
selector:
33+
matchLabels:
34+
app: vflow
35+
replicas: 3
36+
template:
37+
metadata:
38+
labels:
39+
app: vflow
40+
annotations:
41+
prometheus.io/scrape: "true"
42+
prometheus.io/port: "8081"
43+
spec:
44+
hostname: vflow
45+
affinity:
46+
podAntiAffinity:
47+
requiredDuringSchedulingIgnoredDuringExecution:
48+
- labelSelector:
49+
matchExpressions:
50+
- key: app
51+
operator: In
52+
values:
53+
- vflow
54+
topologyKey: "kubernetes.io/hostname"
55+
containers:
56+
- name: vflow
57+
image: mehrdadrad/vflow:latest
58+
imagePullPolicy: Always
59+
ports:
60+
- containerPort: 4739
61+
protocol: UDP
62+
- containerPort: 6343
63+
protocol: UDP
64+
- containerPort: 9996
65+
protocol: UDP
66+
- containerPort: 4729
67+
protocol: UDP
68+
- containerPort: 8081
69+
volumeMounts:
70+
- name: vflow-config-volume
71+
mountPath: /etc/vflow
72+
volumes:
73+
- name: vflow-config-volume
74+
configMap:
75+
defaultMode: 420
76+
name: vflow-config
77+
---
78+
apiVersion: v1
79+
kind: ConfigMap
80+
metadata:
81+
name: vflow-config
82+
data:
83+
vflow.conf: |-
84+
mq-name: nsq

0 commit comments

Comments
 (0)