<p>Assume I have a deployment/Pod with lets say a name "xyz" . I would like to check if this Pod has a specific image. If this image is different from what I have recently pulled from the docker registry only then deploy. Otherwise don't deploy.
This is assuming that the tags are not updated. any ideas appreciated. </p>

<p>Check this out this thread <a href="https://stackoverflow.com/questions/46266006/how-do-i-redeploy-everything-in-kubernetes-after-updating-a-dockerfile/46266696#46266696">here</a> is based on rolling update mechanism. Or directly set using the command line tool as kubectl,</p>

<pre><code>$ kubectl set image deployment/auth-deployment auth=auth:2.1.0
</code></pre>

<p>Then you can simply check the status and deployment respectively to get the change by the above rollout. Details is in the link of comment given by Genti Saliu.</p>

<p>Note that a rollout process will trigger only and only if deployment's pod template is changed i.e. <code>.spec.template</code> is changed. Using the above <code>set</code> command will not guarantee a uptime until the rollout process is complete. So, it's just user in your dev environment.</p>

<p>For no downtime you have have to use the proper strategy as one below, </p>

<pre><code>minReadySeconds: 7
strategy:
  type: RollingUpdate
  rollingUpdate:
    maxSurge: 1
    maxUnavailable: 1
</code></pre>

<p>As long as the <code>maxUnavailable</code> is set to zero, no existing pod will be replaced until the new pod was instantiated after <code>minReadySeconds</code> time over. This will not give any downtime. Hope this helps.</p>
