Last active
March 22, 2018 16:06
-
-
Save rbsilva/a888beef35ca8b83bc339c8f2859d25a to your computer and use it in GitHub Desktop.
Kubernetes force rolling update of deployment
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 | |
export DEPLOYMENT=$1 | |
kubectl get deployment $DEPLOYMENT -o json | kubectl patch -f - -p "{\"spec\":{\"template\":{\"metadata\":{\"annotations\":{\"date\":\"`date +'%s'`\"}}}}}" | |
kubectl rollout status deployment $DEPLOYMENT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment