← All notes

Helm best practices: structuring chart templates

Answer: This part of the Best Practices Guide focuses on templates.

Structure of the templates directory

Template files should use the yaml extension if they produce YAML output.

The tpl extension may be used for template files that produce no formatted content.

File names should use dashed notation, not camelcase.

Each resource definition should be in its own template file, and the file name should reflect the resource kind.

Defined template names

Templates created inside a define directive are globally accessible.

A chart and all of its subcharts will have access to those defined templates.

For that reason, all defined template names should be namespaced.

New charts should be created with the helm create command so template names follow this practice.

Templates should be indented using two spaces, never tabs.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: The Helm Authors, Templates; The Helm Authors, Templates (source). MIT (https://raw.githubusercontent.com/helm/helm-www/main/LICENSE). Copyright The Helm Authors. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: The Helm Authors, Templates; The Helm Authors, Templates (source). MIT (https://raw.githubusercontent.com/helm/helm-www/main/LICENSE). Copyright The Helm Authors.

Cite this

Permanent ID: iil:note:c33y64yf

iinventedlight. 2026. "Helm best practices: structuring chart templates." iinventedlight Library, iil:note:c33y64yf, version of 2026-11-24. https://iinventedlight.com/library/notes/helm-best-practices-templates/. License: CC-BY-4.0.

@misc{iil_note_c33y64yf,
  author = {{iinventedlight}},
  title = {{Helm best practices: structuring chart templates}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-24},
  url = {https://iinventedlight.com/library/notes/helm-best-practices-templates/},
  note = {Permanent ID iil:note:c33y64yf. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

Extra files beside this note

These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.

All artifact files (JSON index)

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/helm-best-practices-templates.md.