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
- id: C1 claim: This part of the guide focuses on templates. source: S1 evidence: "This part of the Best Practices Guide focuses on templates."
- id: C2 claim: Defined template names should be namespaced. source: S1 evidence: "all defined template names should be namespaced"
- id: C3 claim: This part of the guide focuses on templates. source: S2 evidence: "This part of the Best Practices Guide focuses on templates."
- id: C4 claim: Defined template names should be namespaced. source: S2 evidence: "all defined template names should be namespaced"
Sources
- [S1] Templates. The Helm Authors. https://helm.sh/docs/chart_best_practices/templates/ . License: MIT. Accessed 2026-11-24.
- [S2] Templates (source). The Helm Authors. https://raw.githubusercontent.com/helm/helm-www/main/docs/chart_best_practices/templates.md . License: MIT. Accessed 2026-11-24.
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
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.},
}
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.
- helm-best-practices-templates.schema.json (schema; CC-BY-4.0)
- helm-best-practices-templates.table.json (table; CC-BY-4.0)
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.