Meliurwen
0facdf5533
|
4 years ago | |
---|---|---|
LICENSE | 4 years ago | |
README.md | 4 years ago | |
iperf2-k8s-flood.sh | 4 years ago | |
iperf2-k8s.sh | 4 years ago | |
iperf2.yaml | 4 years ago | |
iperf3-k8s.sh | 4 years ago | |
iperf3.yaml | 4 years ago | |
network-policy.yaml | 4 years ago |
README.md
iperf3-k8s
Simple wrapper around iperf3 to measure network bandwidth from all nodes of a Kubernetes cluster.
How to use
Make sure you are using the correct cluster context before running this script: kubectl config current-context
./iperf3.sh
Any options supported by iperf3 can be added, e.g.:
./iperf3.sh -t 2
NetworkPolicies
If you need NetworkPolicies you can install it:
kubectl apply -f network-policy.yaml
And cleanup afterwards:
kubectl delete -f network-policy.yaml
How it works
The script will run an iperf3 client inside a pod on every cluster node including the Kubernetes master. Each iperf3 client will then sequentially run the same benchmark against the iperf3 server running on the Kubernetes master.
All required Kubernetes resources will be created and removed after the benchmark finished successfully.
This has been tested with v1.9.6, v1.10.3 and v1.11.6 of Kubernetes.
The latest version of this Docker image is used to run iperf3: https://hub.docker.com/r/networkstatic/iperf3/
Details on how to use iperf3 can be found here: https://github.com/esnet/iperf
Thanks
Thanks to Pharb for the code. This is a repackaged version of his project adapted for my use cases.