<p>I've been reading about the Kubernetes imagePullPolicy attribute when set to 'always', and it seems like something has changed:</p>
<p>Up through <a href="https://v1-21.docs.kubernetes.io/docs/concepts/containers/images/" rel="nofollow noreferrer">version 1.21 of the documentation</a>, it said the following:</p>
<p><em>If you would like to always force a pull, you can do one of the following:</em></p>
<ul>
<li><em>set the imagePullPolicy of the container to Always.</em></li>
<li><em>omit the imagePullPolicy and use :latest as the tag for the image to use; Kubernetes will set the policy to Always.</em></li>
<li><em>omit the imagePullPolicy and the tag for the image to use.</em></li>
<li><em>enable the AlwaysPullImages admission controller.</em></li>
</ul>
<p>But starting with <a href="https://v1-22.docs.kubernetes.io/docs/concepts/containers/images/#image-pull-policy" rel="nofollow noreferrer">version 1.22 of the K8S documentation</a>, it says imagePullPolicy works as follows when set to always:</p>
<p><em>Every time the kubelet launches a container, the kubelet queries the container image registry to resolve the name to an image digest. If the kubelet has a container image with that exact digest cached locally, the kubelet uses its cached image; otherwise, the kubelet pulls the image with the resolved digest, and uses that image to launch the container.</em></p>
<p>These are very different explanations:  &lt;= 1.21, it says that 'always' forces the image to always be pulled from the registry.  But &gt;=1.22, it says 'always' forces a digest check against the registry, but will use a cached copy if nothing changed.</p>
<p>I'm trying to understand if the <strong>behavior</strong> actually changed starting in 1.22, or was this simply a change to the explanation and documentation?</p>

<p>I think this change tends to save network bandwidth rather than changing the behaviour. In <code>1.21</code> or earlier versions, k8s is Always trying to pull the image all over again without checking some image layers exists on the node or not. In the new version, k8s will check the image layers and if they exist, it will pull only the missing layers. Yes, behavior is changed to some extent but users &amp; clusters are not supposed to be effected negatively by this change.</p>
<p>These lines below in the same documentation indicates that its ultimate behaviour will not change;</p>
<pre><code>The caching semantics of the underlying image provider make even imagePullPolicy: Always efficient, as long as the registry is reliably accessible. Your container runtime can notice that the image layers already exist on the node so that they don't need to be downloaded again.

Note:
You should avoid using the :latest tag when deploying containers in production as it is harder to track which version of the image is running and more difficult to roll back properly.
</code></pre>
