values.yaml — Default Values
values.yaml holds the default configuration a chart's templates read through the .Values object.
key: value
nested:
child: valuevalues.yaml is where a chart's default settings live. Every key you define here becomes available in templates as .Values.<key>.
Structure freely
Values can be nested maps, lists, strings, numbers, and booleans — ordinary YAML. Group related settings under a parent key (like image) to keep things tidy.
Defaults, not commands
The values here are defaults. Users override them at install time with -f or --set without editing the chart.
Example
# Default values for mychart
replicaCount: 1
image:
repository: nginx
tag: "1.25"
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 80
resources: {}
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 5When to use it
- A chart author documents every configurable option in values.yaml with comments so operators know exactly what they can override without reading the templates.
- An operator creates a production values file that overrides only the keys that differ from the defaults in values.yaml, keeping the override file minimal and readable.
- A developer uses helm show values bitnami/postgresql to inspect a third-party chart's values.yaml before writing an override file for their deployment.
More examples
Typical values.yaml structure
Shows a realistic values.yaml with comments, nested keys, and sensible defaults that templates will consume via .Values.
# Number of application replicas
replicaCount: 1
image:
repository: myregistry/myapp
tag: latest
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 80
resources:
limits:
cpu: 500m
memory: 256MiRead values in a template
Demonstrates how templates reference nested keys from values.yaml through the .Values object.
# templates/deployment.yaml
spec:
replicas: {{ .Values.replicaCount }}
template:
spec:
containers:
- name: app
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}Inspect a chart's defaults
Exports a chart's full defaults to a file, lets you edit just what differs, and installs using that values file.
helm show values bitnami/postgresql > pg-defaults.yaml
# Edit only what you need to override
helm install my-pg bitnami/postgresql -f pg-defaults.yaml
Discussion