master
Meliurwen 4 years ago
parent a9ce9c5863
commit 03f5b5e5b8
Signed by: meliurwen
GPG Key ID: 818A8B35E9F1CE10
  1. 2
      .gitignore
  2. 3
      iperf2.yaml
  3. 10
      iperf3-k8s.sh

2
.gitignore vendored

@ -0,0 +1,2 @@
*.json
*.csv

@ -63,13 +63,12 @@ spec:
---
apiVersion: apps/v1
kind: ReplicaSet
kind: DaemonSet
metadata:
name: iperf2-clients
labels:
app: iperf2-client
spec:
replicas: 18
selector:
matchLabels:
app: iperf2-client

@ -37,9 +37,17 @@ echo
CLIENTS=$(kubectl get pods -l app=iperf3-client -o name | cut -d'/' -f2)
arguments="$*"
timestamp="$(date +"%Y-%m-%d_%H-%M-%S")"
for POD in ${CLIENTS}; do
HOST=$(kubectl get pod "${POD}" -o jsonpath='{.status.hostIP}')
kubectl exec -it "${POD}" -- iperf3 -c iperf3-server -T "Client on ${HOST}" "$@"
if [[ "${arguments}" == *"-J"* ]]; then
kubectl exec -it "${POD}" -- iperf3 -c iperf3-server -T "${HOST}" "$@" > "reports/${timestamp}-${HOST}-${POD}.json"
else
kubectl exec -it "${POD}" -- iperf3 -c iperf3-server -T "${HOST}" "$@"
fi
echo
done

Loading…
Cancel
Save