Created
September 8, 2020 17:42
-
-
Save nmittler/ea7c3b345edbf893b198f300b5d61078 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
ARGS=( "${@:1}" ) | |
function sendTraffic() | |
{ | |
for CTX in "${ARGS[@]}"; do | |
echo "Sending traffic from cluster $CTX" | |
for i in {1..10}; do | |
kubectl exec --context=${CTX} -it -n sample -c sleep \ | |
$(kubectl get pod --context=${CTX} -n sample -l \ | |
app=sleep -o jsonpath='{.items[0].metadata.name}') -- curl \ | |
helloworld.sample.global:5000/hello | |
done | |
done | |
} | |
# Send traffic from each cluster and log the version. | |
sendTraffic |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment