You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
89 lines
1.9 KiB
89 lines
1.9 KiB
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: iperf2-server-deployment
|
|
labels:
|
|
app: iperf2-server
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: iperf2-server
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: iperf2-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: iperf2-server
|
|
image: mlabbe/iperf
|
|
args: ['-s']
|
|
ports:
|
|
- containerPort: 5001
|
|
protocol: TCP
|
|
name: server-tcp
|
|
- containerPort: 5001
|
|
protocol: UDP
|
|
name: server-udp
|
|
terminationGracePeriodSeconds: 0
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: iperf2-server
|
|
spec:
|
|
selector:
|
|
app: iperf2-server
|
|
ports:
|
|
- protocol: TCP
|
|
port: 5001
|
|
name: crappy-tcp
|
|
targetPort: server-tcp
|
|
- protocol: UDP
|
|
port: 5001
|
|
name: crappy-udp
|
|
targetPort: server-udp
|
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
kind: DaemonSet
|
|
metadata:
|
|
name: iperf2-clients
|
|
labels:
|
|
app: iperf2-client
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: iperf2-client
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: iperf2-client
|
|
spec:
|
|
tolerations:
|
|
- key: node-role.kubernetes.io/master
|
|
operator: Exists
|
|
effect: NoSchedule
|
|
containers:
|
|
- name: iperf2-client
|
|
image: mlabbe/iperf
|
|
command: ['/bin/sh', '-c', 'sleep infinity']
|
|
# To benchmark manually: kubectl exec iperf2-clients-jlfxq -- /bin/sh -c 'iperf -c iperf2-server'
|
|
terminationGracePeriodSeconds: 0
|
|
|