What happens when we upgrade a Statefulset to a newer image Version?

Viewed 295
  1. I have a 2 replicas of statefulsets with image name : ABC:1.1
  2. No I want to Upgrade the statefulset to newer Version : ABC:1.2

ImagePullPolicy is set to always

Also suppose once i already deployed the my statefulset with version ABC:1.2, then went back to ABC:1.1 and now I'm trying to upgrade it to version ABC:1.2.

1.2(once deployed) ==> went back to version(1.1) ==> Now would want to upgrade again to (1.2)

Q1) My Question is, will my whole Image be pulled again from Docker repo ? Or Only Missing layers will be pulled ?

Q2) Does ImagePullPolicy forces a whole image pull or just missing layers?

Please help me understand this.

2 Answers

Answer to your both question is that the whole image will be pulled again. and it will say layer already exists after pulling if any layers exist. Just hint you always pull images not the specfic layers.

You can check the details of what is happening in deployment usin the following commands:

kubectl rollout status deploy/ABC

kubectl rollout history deploy/ABC

kubectl describe deploy ABC
Related