MrE
MrE

Reputation: 20768

force refresh of docker image when updated in registry / kubernetes

Using Kubernetes for deployment:

Considering I have a Dockerfile, I build, then push to registry. If I run a container on a host, the image gets pulled and the container is ran.

Now, if i update the Dockerfile, build and push again, without changing its tag then the image is changed in the registry, but the host has the image pulled, and it doesn't seem to go look for updates.

How do i force a pull to get the latest image when running a container? I can manually pull the image, but I'd like to know if there is a 'formal way' of doing this (in the pod or rc templates?)

Thanks for insight.

Upvotes: 4

Views: 4077

Answers (1)

Jordan Liggitt
Jordan Liggitt

Reputation: 18111

Set an imagePullPolicy of Always on the container

Upvotes: 5

Related Questions