Skip to main content
Let’s look at how to customize Helm chart parameters when installing a chart. You can use the chart’s built-in defaults from values.yaml, override single values from the command line, supply one or more custom values files, or edit the chart locally before installing.
A dark presentation slide with the title "Customizing Chart Parameters" on the left and a large HELM logo displayed on the right.
Where do the default values come from?
  • Charts expose configurable fields in their values.yaml. The chart templates read those values and inject them into the rendered Kubernetes manifests.
  • For example, the WordPress chart exposes fields such as wordpressUsername, wordpressEmail, and wordpressBlogName in values.yaml. The deployment template then uses those values to populate environment variables in the pod spec.
Example values.yaml fragment:
Example snippet from the chart template (e.g., deployment.yaml) that uses those values:
How Helm merges values (precedence)
  • Helm takes the chart’s values.yaml as defaults.
  • Values from files passed with --values (or -f) override those defaults.
  • Explicit values passed with --set or --set-file have the highest precedence and override values from files and the chart.
Best practice: Use a custom values file for multiple or repeatable changes and reserve --set for a few quick overrides. Keep secrets in Kubernetes Secret objects or use --set-file to avoid exposing secrets on the command line.
Overriding values with —set
  • Use --set to override individual keys from the command line. This is handy for quick one-off changes.
Example:
Notes and common pitfalls with --set:
  • Quoting is important for values with spaces or special characters.
  • For nested keys use dot notation (e.g., --set persistence.enabled=true).
  • Complex values or long lists are easier to manage in a values file.
Warning: Avoid placing sensitive secrets directly on the command line with --set (they may be stored in shell history). Prefer Kubernetes Secrets, --set-file, or protected values files.
Using a custom values file
  • When you need to override many values or keep a reproducible configuration, create a custom values file and pass it with --values (or -f).
Create custom-values.yaml:
Install using the custom values file:
You can pass multiple -f files; files passed later have higher precedence than earlier ones. Editing the chart’s values.yaml locally
  • If you want to inspect or modify the entire chart locally, pull and untar the chart, edit values.yaml, and install from the local directory.
Commands:
When installing from the local directory, Helm uses the values.yaml in that directory unless you override it with --values or --set. Quick comparison of methods Links and references That covers the standard ways to customize chart parameters when installing Helm charts.

Watch Video

Practice Lab