Helm upgrade doesn't pull new container

9/21/2017

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?

-- trahloff
continuous-integration
devops
kubernetes
kubernetes-helm

1 Answer

9/21/2017

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.

-- Radek 'Goblin' Pieczonka
Source: StackOverflow