Last active
December 7, 2020 01:51
-
-
Save stnet253/9adf1b455621ec66de5cd611a0bf0bb2 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 | |
version=/etc/nginx/conf.d/version/version.conf | |
if [ -n "$1" ];then | |
for nginx in $(kubectl get pods -l app=nginx-static -o=name); do | |
kubectl exec -it $nginx -- cat $version |grep $1; | |
done | |
else | |
echo "FAIL!!! EX: sh $0 1001" | |
fi |
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 | |
for nginx in $(kubectl get pods -l app=nginx-static -o=name); do | |
kubectl exec -it $nginx -- nginx -s reload; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment