22

I have a question about a Helm upgrade. I'm working on a chart foo-1.0.0 which deploys a pod with a docker image bar:4.5.1.

I have a release "myrelease" based on this chart foo in version 1.0.0 (with a bar:4.5.1 running inside).

Now, I make a fix on bar, rebuild the image bar:4.5.2, change the image in the chart but I did not bump its version. It is still foo-1.0.0

I launch:

$ helm upgrade myrelease repo/foo --version 1.0.0

My problem is that after the upgrade, my pod is still running the bar:4.5.1 instead the 4.5.2

Is the a "cache" in tiller? It seems that tiller did not download foo-1.0.0 again. Is there a way to force it to download?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Fred Mériot
  • 4,157
  • 9
  • 33
  • 50

1 Answers1

45

You need to change the tag version in the image section of values.yaml:

image:
  repository: bar
  tag: 4.5.2
  pullPolicy: Always

and then run the following command:

helm upgrade myrelease repo/foo 

or just run the following:

helm upgrade myrelease repo/foo --set=image.tag=1.2.2

and set the applicable image version.

costaparas
  • 5,047
  • 11
  • 16
  • 26
Nick Rak
  • 2,629
  • 13
  • 19
  • Note I had to delete the deployment with kubectl before running helm upgrade, due to the selector labels being updated by the helm upgrade, which is an immutable field and not possible while the previous deployment is still running. – Blaisem Jul 18 '23 at 16:02