values.yaml, override single values from the command line, supply one or more custom values files, or edit the chart locally before installing.

- 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, andwordpressBlogNameinvalues.yaml. The deployment template then uses those values to populate environment variables in the pod spec.
values.yaml fragment:
deployment.yaml) that uses those values:
- Helm takes the chart’s
values.yamlas defaults. - Values from files passed with
--values(or-f) override those defaults. - Explicit values passed with
--setor--set-filehave 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.- Use
--setto override individual keys from the command line. This is handy for quick one-off changes.
--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.- When you need to override many values or keep a reproducible configuration, create a custom values file and pass it with
--values(or-f).
custom-values.yaml:
-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.
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.