Updating kubernetes helm values Updating kubernetes helm values kubernetes kubernetes

Updating kubernetes helm values


helm upgrade -f ingress-controller/values.yml nginx-ingress stable/nginx-ingress

Or more generally:

helm upgrade -f new-values.yml {release name} {package name or path} --version {fixed-version}

The command above does the job.

Unless you manually specify the version with the --version {fixed-version} argument, upgrade will also update the chart version. You can find the current chart version with helm ls.

Docs: https://helm.sh/docs/helm/#helm-upgrade


EDIT 2020-04-03:

--recreate-pods --wait is not recommended anymore. As Jorden pointed out one way is to add a checksum annotations that will implies to restart the pods if any file change. see https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments for reference doing so.

ORIGINAL ANSWER

To complement the answer of @stan-bondi, you can do :

helm upgrade --recreate-pods --wait -f new_values.yaml nginx-controller nginx-controller

This is often needed when you juste changed a configMap or secrets that wont be detected as a change in the release itself.


This is how I update the current chart with new values, without upgrading the chart version:

helm upgrade --reuse-values -f values.yaml {release-name} {release-path} --version {fixed-version}

For example:

helm upgrade --reuse-values -f prometheus/values.yaml prometheus-operator stable/prometheus-operator --version 5.7.0 --namespace monitoring

I use a fixed version of the installed chart, and add --reuse-values flag to ensure that I keep the previous values I used.