forked from Pharb/kubernetes-iperf3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
iperf3.yaml
89 lines (85 loc) · 1.8 KB
/
iperf3.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
---
apiVersion: v1
kind: Namespace
metadata:
name: iperf3
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: iperf3-server-deployment
namespace: iperf3
labels:
app: iperf3-server
spec:
replicas: 1
selector:
matchLabels:
app: iperf3-server
template:
metadata:
labels:
app: iperf3-server
spec:
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: kubernetes.io/role
operator: In
values:
- master
tolerations:
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
containers:
- name: iperf3-server
image: taoyou/iperf3-alpine
args: ['-s']
ports:
- containerPort: 5201
name: server
terminationGracePeriodSeconds: 0
---
apiVersion: v1
kind: Service
metadata:
namespace: iperf3
name: iperf3-server
spec:
selector:
app: iperf3-server
ports:
- protocol: TCP
port: 5201
targetPort: server
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
namespace: iperf3
name: iperf3-clients
labels:
app: iperf3-client
spec:
selector:
matchLabels:
app: iperf3-client
template:
metadata:
labels:
app: iperf3-client
spec:
tolerations:
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
containers:
- name: iperf3-client
image: taoyou/iperf3-alpine
command: ['/bin/sh', '-c', 'sleep infinity']
# To benchmark manually: kubectl exec iperf3-clients-jlfxq -- /bin/sh -c 'iperf3 -c iperf3-server'
terminationGracePeriodSeconds: 0