Helm templates: accessing files inside templates
Answer: Helm provides access to files through the Files object.
What can be read
This makes it easy to import one template from within another template.
Charts must stay under 1M because of storage limits on Kubernetes objects.
Some files cannot be read through the Files object, usually for security reasons.
Files in the templates directory cannot be accessed.
Files excluded using helmignore cannot be accessed.
Path helpers
Helm also imports many functions from the Go path package for your use.
Those helpers use the same names as in the Go package, but with a lowercase first letter.
You can create a variable to hold a reference to the Files object.
A ConfigMap example in the docs loops through a list of files and prints each name with its contents.
See also
Claims
- id: C1 claim: Helm provides access to files through the Files object. source: S1 evidence: "Helm provides access to files through the .Files object."
- id: C2 claim: Charts must be smaller than 1M because of the storage limitations of Kubernetes objects. source: S1 evidence: "Charts must be smaller than 1M because of the storage limitations of Kubernetes objects."
- id: C3 claim: Files in the templates directory cannot be accessed. source: S1 evidence: "Files in templates/ cannot be accessed."
- id: C4 claim: Those helpers use the same names as in the Go package, but with a lowercase first letter. source: S2 evidence: "accessible with the same names as in the Go package"
Sources
- [S1] Accessing Files Inside Templates. The Helm Authors. https://helm.sh/docs/chart_template_guide/accessing_files/ . License: MIT. Accessed 2026-11-24.
- [S2] Accessing Files Inside Templates (source). The Helm Authors. https://raw.githubusercontent.com/helm/helm-www/main/docs/chart_template_guide/accessing_files.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, Accessing Files Inside Templates; The Helm Authors, Accessing Files Inside 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, Accessing Files Inside Templates; The Helm Authors, Accessing Files Inside Templates (source). MIT (https://raw.githubusercontent.com/helm/helm-www/main/LICENSE). Copyright The Helm Authors.
Cite this
iinventedlight. 2026. "Helm templates: accessing files inside templates." iinventedlight Library, iil:note:p9ht2wp0, version of 2026-11-24. https://iinventedlight.com/library/notes/helm-accessing-files/. License: CC-BY-4.0.
@misc{iil_note_p9ht2wp0,
author = {{iinventedlight}},
title = {{Helm templates: accessing files inside templates}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-24},
url = {https://iinventedlight.com/library/notes/helm-accessing-files/},
note = {Permanent ID iil:note:p9ht2wp0. 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-accessing-files.schema.json (schema; CC-BY-4.0)
- helm-accessing-files.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-accessing-files.md.