<p>I have a pipeline which creates an image and pushes to Quay repository and then deploys to Openshift cluster. In my deployment-config file I have mentioned the image name as quay.:dev. So whenever a new image is created, it is created with same name and tag.
My question is will this pipeline and deployment make any changes to the pod running in the namespace or it will not identify any change and old pod will keep on running ?
Do I need to change tag on every run ?</p>

<p>You need to change the image tag on every run.  As a general rule, in Kubernetes you want to avoid fixed image tags like <code>...:dev</code> or <code>...:latest</code>.</p>
<p>With the workflow you suggest, two things will happen.</p>
<p>First, updating the Kubernetes Deployment will have no effect.  The new Deployment object will be byte-for-byte identical to the old one.  The cluster will see you want to have 3 Pods running the <code>quay...:dev</code> image, and those exist, so there's nothing to change.</p>
<p>Second, the images in the cluster can get out of sync.  Kubernetes (and plain Docker) will normally only pull an image if it doesn't exist on the node.  So if you do start a new Pod and some <code>quay...:dev</code> image already exists on the node, it will just get used as-is.  But say a node fails and is replaced, and it was running a replica of your application; the new node won't have a copy of your image, and if the replacement Pod is scheduled there then it will pull the then-current copy of the image, even though it's not the same actual build as in the rest of the cluster.</p>
<p>I'd recommend using a unique tag for every build of your application.  The source control commit ID or the current date/time are two things that are easy to use.  You then need to update the Deployment's <code>image:</code> on every build, but since this changes it will cause every existing Pod to be replaced with the newer image.</p>
