How do I upgrade a helm chart with a new values.yaml and keep the previous deployments data?

10/3/2018

I deployed a helm chart using config-v1.yaml. I added some data to my helm chart app via an api exposed in the helm chart

I want to deploy/update the current chart with values from config-v2.yaml because there is a feature I want to expose.

When I use helm upgrade -f config-v2.yaml my-chart stable/chart. The previous helm version is blown away meaning the data I added with the API is gone. So I figure I need to add a volume to my container.

When I add a PersistentVolume and PersistentVolumeClaim, the app fails to update with values from config-v2.yaml which means I don't get the new features I want.

What is the proper way to do these types of updates to helm charts?

-- nodox
kubernetes
kubernetes-helm

1 Answer

10/4/2018

To upgrade, use '--reuse-values' flag as you are providing extra customization to the existing values.

In your case, you can use

helm upgrade --reuse-values -f config-v2.yaml my-chart stable/chart

Please refer the docs.

-- Vineet Palan
Source: StackOverflow