Values & overrides
Configure a chart per environment.
values.yaml is the chart’s configuration surface: the defaults a chart author exposes, which templates read as .Values.<path>. Users override them without touching the templates — with -f myvalues.yaml (a file) or --set key=value (inline). This is how one chart serves dev, staging, and prod: same templates, different values files. Override precedence is later files/flags win, with --set beating -f.
# chart default values.yamlreplicaCount: 1image:repository: registry.internal/payments-apitag: "2.1.0"resources:limits: { cpu: 500m, memory: 256Mi }---# prod-values.yaml (override just what differs)replicaCount: 4resources:limits: { cpu: "2", memory: 1Gi }
$ helm install payments ./payments-api -f prod-values.yaml$ helm upgrade payments ./payments-api -f prod-values.yaml --set replicaCount=6# --set overrides the file; later -f files override earlier ones
Inspecting effective values
To see what a release actually used, helm get values shows the overrides and helm get manifest shows the rendered result. During development, helm template --values prod-values.yaml renders the whole chart locally so you can review exactly what would be applied before touching the cluster. Reviewing the rendered output is the single best habit for catching values mistakes.