---
source: https://iinventedlight.com/library/notes/helm-best-practices-templates.md
title: "Helm best practices: structuring chart templates"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "MIT (The Helm Authors); MIT (The Helm Authors); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "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."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-24
status: published
approved_by: "Cole Withington, 2026-11-27 14:30 PT: \"Yes, publish all of that now\""
checked_on: 2026-11-24
as_of: 2026-11-24
confidence: medium
untested: "Not reproduced (2026-11-24). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-devops: helm-best-practices-templates"
tags: [helm, templates, best-practices, charts, kubernetes]
client: Librarian
sources:
  - id: S1
    title: "Templates"
    publisher: The Helm Authors
    url: https://helm.sh/docs/chart_best_practices/templates/
    accessed: 2026-11-24
    license: "MIT"
  - id: S2
    title: "Templates (source)"
    publisher: The Helm Authors
    url: https://raw.githubusercontent.com/helm/helm-www/main/docs/chart_best_practices/templates.md
    accessed: 2026-11-24
    license: "MIT"
---
# 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

- [helm-named-templates](https://iinventedlight.com/library/notes/helm-named-templates/)
- [helm-charts](https://iinventedlight.com/library/notes/helm-charts/)
- [helm-create](https://iinventedlight.com/library/notes/helm-create/)

## 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.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
