Skip to content
Latchkey

helm template: Render Manifests in CI

Locally render a chart to Kubernetes YAML without installing it.

helm template renders chart templates with your values to plain manifests, no cluster required. In CI it powers manifest diffs, policy checks (kubeconform, conftest), and GitOps pipelines that apply the rendered output. Add --validate to check against a live API server.

Common flags

  • RELEASE CHART - release name and chart (positional)
  • -f values.yaml / --set key=value - values overrides
  • --output-dir DIR - write each manifest to a file
  • --validate - validate against the cluster API (needs access)

Example in CI

Render manifests and pipe them into a policy check.

shell
helm template api ./charts/api \
  -f values.prod.yaml | kubeconform -strict -

Common errors in CI

  • Error: template: ... at <.Values.X>: nil pointer evaluating - value referenced but not set
  • Error: parse error ... unexpected - invalid template syntax
  • execution error ... required value - a required helper failed the render

Key takeaways

  • Renders charts to YAML offline for diffs, policy checks, and GitOps.
  • Pipe output into kubeconform/conftest to gate manifests in CI.
  • nil pointer errors mean a referenced value was never set.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →