Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Helm upgrade doesn't pull new container

I Build a simple NodeJS API, pushed the Docker Image to a repo and deployed it to my k8s with Helm install (works perfectly fine).

The pullPolicy is Always.

Now I want to update the source code and deploy the updated version of my app. I bumped the version in all files, built and pushed the new Docker image und tried helm upgrade but it seems like nothing happened. With helm list I can see that revision was deployed but the changes to source code were not deployed. watch kubectl get pods also shows that no new pods were created the way you expect it with kubectl --apply...

What did I do wrong?

like image 879
trahloff Avatar asked Sep 21 '17 06:09

trahloff


1 Answers

Helm will roll out changes to kubernetes objects only if there are changes to roll out. If you use :latest there is no change to be applied to the deployment file, ergo no pods will rolling update. To keep using latest, you need to add something (ie. label with sha / version) that will change and cause deployment to get updated by helm. Also keep in mind that you will usualy need ImagePullPolicy: Always as well.

like image 199
Radek 'Goblin' Pieczonka Avatar answered Oct 20 '22 13:10

Radek 'Goblin' Pieczonka