0

Suppose I have a deployment in kubernetes, now I want to update the image for that deployment that is why i used rolling updates using kubectl set image deployments/<deployment_name> <new_image_version> command.

As far I understood the rolling updates concepts, during rolling updates the deployment's updates is done by incrementally updating pods instances with new ones, and it happens one by one.

Now my question is, suppose we had 10 pods and during rolling updates 2 pods have updated and rest of the pods are in the updating stage. Now at this situation if users hit to the service then which information will they get?

Sahadat Hossain
  • 3,583
  • 2
  • 12
  • 19

1 Answers1

3

Both. Some users will get the previous information, some will get the updated information.

Kun Li
  • 2,570
  • 10
  • 15
  • If it happens then isn't it a loophole? – Sahadat Hossain Jan 08 '21 at 06:31
  • 1
    It's your responsibility to keep two versions compatible, or you can use istio or other gateway to run green-blue deployment. – Kun Li Jan 08 '21 at 06:40
  • 2
    If backwards-compatibility is hard to achieve, consider using blue/green deployment: https://kubernetes.io/blog/2018/04/30/zero-downtime-deployment-kubernetes-jenkins/#blue-green-deployment – Fritz Duchardt Jan 08 '21 at 08:31