I'm working with a StatefulSet setup for Redis and RabbitMQ using Bitnami's Helm charts, and I've set the imagePullPolicy to 'IfNotPresent'. I want to change the repository from Bitnami to Bitnami Archive, but the image content will remain the same (the MD5/hash is unchanged). Will Kubernetes recognize that there's no real change and keep the current image from the cache, or will it trigger a new image pull and force a redeployment of my application pods?
5 Answers
Changing the image tag, name, or repository definitely affects the pod template hash, which will trigger a redeployment or update in Kubernetes.
I found a workaround to avoid rollouts when CI changes image URLs from a local registry to GitLab’s. The good part is that Docker/containerd won’t download images with the same digest again, but that might not prevent Kubernetes from rolling out new pods.
If it changes the spec.template, it’ll definitely cause a rollout since that alters the hash of the ReplicaSet. The only way I found to manage this is to set an onDelete strategy for the StatefulSet.
I doubt Kubernetes has the intelligence to avoid a rollout in this case. I think it will trigger a redeploy, but you might find the container runtime using the cached image.
It seems like changing the repository name would be seen as a change, so it likely will trigger a redeployment. That's why it's a good idea to test in a lab environment first—it’s often quicker than asking for help!
I have a lab set up too, but this switch has already happened for me. The image is gone from the original repo, so I can't easily flip back to check how Kubernetes reacts.
I’d expect it to redownload, but luckily, everything should still be cached if the image is unchanged.

So, if it won't redownload due to the same digest, will Kubernetes still force a rollout?