When you upgrade a Helm chart in a Kubernetes cluster you can also customize parameters of the chart to configure a release.
The Helm chart parameters customization is carried out by updating сhart values.
This note shows how to update a Helm chart with new values using a helm upgrade
command.
Cool Tip: How to render a Helm chart template locally! Read more →
Helm Chart Values Update
List installed Helm charts to get a release name of the chart to upgrade:
$ helm list
- sample output -
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
grafana default 1 2023-01-12... deployed grafana-6.12.1 8.0.1
To get custom values, used for the Helm chart release, execute:
$ helm get values <releaseName> - example - $ helm get values grafana - sample output - USER-SUPPLIED VALUES: service: port: 8080
To get all the values:
$ helm get values <releaseName> -a
To update the Helm chart values, create a new-values.yml
file, for example:
# new-values.yml
replicas: 2
service:
port: 8080
Cool Tip: List Helm charts and repositories using a helm
command! Read more →
Upgrade the Helm chart by applying the new-values.yml
file:
$ helm upgrade -f <VALUES_FILE> <CHART_NAME> <REPO_NAME>/<PATH_TO_CHART> \
--version <CHART_VERSION>
- example -
$ helm upgrade -f new-values.yml grafana grafana/grafana --version grafana-6.12.1
In the example above i specify the same version as of the currently installed Helm chart, as i just want to update the values without upgrading the product itself.
ℹ Reuse Values: By default, the helm upgrade
command reset the values to the ones built into the chart. To reuse the last release’s values and merge in any overrides from the command line via --set
or -f
, add the --reuse-values
option.
To verify the Helm chart upgrade, check the new revision number:
$ helm list
- sample output -
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
grafana default 2 2023-01-12... deployed grafana-6.12.1 8.0.1
To check the new custom values, execute:
$ helm get values <releaseName> - example - $ helm get values grafana - sample output - USER-SUPPLIED VALUES: replicas: 2 service: port: 8080