How to override a helm value How to override a helm value kubernetes kubernetes

How to override a helm value


Most Helm charts contain at least the following in their values.yaml file, which sets a default docker image tag, and also allows the user installing/upgrading the chart to specify a different image without having to modify the chart itself.

# values.yamlimage:  repository: <docker-repo-url-here>  tag: <docker-image-tag-here>

And in the deployment yaml, fetch the values from the values.yaml

# deployment.yamlkind: Deploymentspec:  template:    spec:      containers:      - name: container-name        image: "{{ .Values.image.repository }}:{{ .Values.image.tag}}"

From there, you can do a simple helm upgrade <release-name> <chart-path> --set image.tag=<new-image-tag> when you want to use a new image.