Skip to content

Instantly share code, notes, and snippets.

@stnet253
Last active December 7, 2020 01:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stnet253/9adf1b455621ec66de5cd611a0bf0bb2 to your computer and use it in GitHub Desktop.
Save stnet253/9adf1b455621ec66de5cd611a0bf0bb2 to your computer and use it in GitHub Desktop.
#!/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
#!/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