<p>I have Kubernetes configured to connect to my own container registry, developers are continually pushing changes to that, updating the &quot;:latest&quot; container.</p>
<p>My deployment definition is targetting the :latest tag, and it is all working as I'd expect, but the question has come up that after pushing changes to the container registry, how long should it take before Kubernetes responds to that change and creates a new container?</p>

Jan Martin
<p>It depends on the Image Pull Policy defined in the deployment manifest. If imagePullPolicy of the container is set to Always then the new image gets updated in below scenarios</p>
<ol>
<li>If the pod is deleted. a new pod gets created with the new image</li>
<li>If the pod is scaled out</li>
<li>If you do rolling upgrade of the image</li>
</ol>
<p>Note: If imagePullPolicy of the container is set to IfNotPresent and if you do a rolling upgrade of the image then there is a possibility that nodes having the existing image continue to run existing image and nodes that dont have the existing image would pull latest image if new pod gets scheduled on those nodes. In this scenario different images would run in your environment and would lead to inconsistent behaviour. Best practice is to use proper image tag and use it in the deployment manifest. Avoid latest image tag.</p>
