Skip to content

Instantly share code, notes, and snippets.

@PLaRoche
Created May 23, 2018 20:07
Show Gist options
  • Save PLaRoche/81529243b4a62b128ce1b80fb19b1ed0 to your computer and use it in GitHub Desktop.
Save PLaRoche/81529243b4a62b128ce1b80fb19b1ed0 to your computer and use it in GitHub Desktop.
kcdr
# Add to your bashrc or equivalent
# kcdr will force reload a deployment by re-annotating the metadata with the
# current timestamp.
function kcdr {
kubectl patch deployment $@ -p "{\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"date\":\"`date +'%s'`\"}}}}}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment