<p>I'm using google cloud to store my <strong>Docker</strong> images &amp; host my <strong>kubernetes</strong> cluster. I'm wondering how I can have <strong>kubernetes</strong> pull down the image which has the <strong>latest</strong> tag each time a new one is pushed.</p>
<p>I thought <strong>imagePullPolicy</strong> was the way to go, but it doesn't seem to be doing the job (I may be missing something). Here is my container spec:</p>
<pre><code>&quot;name&quot;: &quot;blah&quot;,
&quot;image&quot;: &quot;gcr.io/project-id/container-name:latest&quot;,
&quot;imagePullPolicy&quot;: &quot;Always&quot;,
&quot;env&quot;: [...]
</code></pre>
<p>At the moment I'm having to delete and recreate the deployments when I upload a new docker image.</p>

<p>Kubernetes it self will never trigger on container image update in repository. You need some sort of CI/CD pipeline in your tooling. Furthermore, I do strongly advise to avoid using <code>:latest</code> as it makes your container change over time. It is much better in my opinion to use some sort of versioning. Be it semantic like <code>image:1.4.3</code> commit based <code>image:&lt;gitsha&gt;</code> or as I use <code>image:&lt;gitsha&gt;-&lt;pushid&gt;</code> where push is a sequentially updated value for each push to repo (so that label changes even if I reupload from the same build).</p>

<p>With such versioning, if you change image in your manifest, the deployment will get a rolling update as expected.</p>

<p>If you want to stick to <code>image:latest</code>, you can add a label with version to your pod template, so if you bump it, it will roll. You can also just kill pods manually one by one, or (if you can afford downtime) you can scale deployment to 0 replicas and back to N</p>
