Cheat Sheet


Quickly trigger Rolling Update of Deployment, StatefulSet, DaemonSet, etc

1
kubectl patch -n kube-system ds kube-proxy -p "{\"spec\":{\"template\":{\"metadata\":{\"annotations\":{\"date\":\"$(date +'%s')\"}}}}}"

Running kubectl replace/kubectl apply on an object which the command above was used on, will always trigger a rolling update again. This is due to the change to the annotations.