Skip to content

/errors/helm/nil-pointer-evaluating-interface

Helm: nil pointer evaluating interface {}.value

verified onenvironmentlocal · windows 10.0.26200 arm64 · GNU bash 5.3.15 (Git Bash) · v4.3.1+gc0d08d0updated 2026-10-20
tool
Helm
exit code
1
versions
Helm 3, Helm 4
os
any

Helm renders templates with Go's text/template. When a template reads .Values.missing.value and missing does not exist, Go evaluates .value on a nil value and Helm stops with nil pointer evaluating interface {}.value. The message shows the file, line and column of the failing expression.

Reproduce it

bash
helm create mychart >/dev/null
cat > mychart/templates/cm.yaml <<'EOF'
apiVersion: v1
kind: ConfigMap
metadata:
  name: app-config
data:
  key: {{ .Values.missing.value }}
EOF
helm template demo ./mychart

Output · exit 1

Error: mychart/templates/cm.yaml:6:17
  executing "mychart/templates/cm.yaml" at <.Values.missing.value>:
    nil pointer evaluating interface {}.value

Use --debug flag to render out invalid YAML

Fix: define the parent in values.yaml

values.yaml
missing:
  value: "default"

Fix: guard optional values

templates/cm.yaml
data:
  {{- with .Values.missing }}
  key: {{ .value | quote }}
  {{- end }}

Or, for a deep optional key with a fallback, dig walks the path and never fails on a missing map:

yaml
  key: {{ dig "missing" "value" "default" .Values.AsMap | quote }}

Sources