Skip to content

Instantly share code, notes, and snippets.

View mati865's full-sized avatar

Mateusz Mikuła mati865

  • Tarnów, Poland
  • 13:13 (UTC +02:00)
View GitHub Profile
@mati865
mati865 / kubernetes-latest-image.md
Created August 30, 2018 19:34 — forked from BrandonPotter/kubernetes-latest-image.md
Force Kubernetes to pull latest container image in a deployment

Force Kubernetes to pull latest container image in a deployment

kubectl patch deployment DEPLOYMENT_NAME -p "{\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"date\":\"`date +'%s'`\"}}}}}"
kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod