Last active
July 21, 2019 04:09
-
-
Save snobu/6f275b8247736f901133171b15de6dc2 to your computer and use it in GitHub Desktop.
kubectl set deployment force image repull
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 | |
# See https://github.com/kubernetes/kubernetes/issues/33664 | |
if [[ $# -eq 0 ]]; then | |
printf 'Pass deployment name as argument.\n\n' | |
kubectl get deployment | |
exit 1 | |
fi | |
echo Patching deployment $1... | |
printf '{"spec":{"template":{"metadata":{"labels":{"date":"%s"}}}}}' `date +%s` | \ | |
xargs -0 kubectl patch deployment $1 -p |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment