apiVersion: apps/v1
kind: Deployment
metadata:
name: iperf3-client-deploy
namespace: perf
spec:
replicas: 10
selector:
matchLabels:
app: iperf3-client
template:
metadata:
labels:
app: iperf3-client
spec:
restartPolicy: Always
containers:
- name: iperf3-client
image: networkstatic/iperf3:latest
command: ["/bin/sh", "-c"]
args:
- |
NODE_LIST=(10.10.10.11 10.10.10.12 10.10.10.13)
NODE=${NODE_LIST[$((RANDOM % ${#NODE_LIST[@]}))]}
echo "Starting test to $NODE:32001"
iperf3 -c $NODE -p 32001 -t 300 -P 4