Anatomy of a Chart

Every file in a Helm chart and what it does. Chart.yaml metadata, values.yaml defaults, templates/, _helpers.tpl named templates, NOTES.txt, CRDs, and chart types.

Overview

A chart is a strict layout

A Helm chart is a directory (or .tgz archive) with a strictly defined layout. Knowing every file and its role is the foundation for debugging charts, writing templates correctly and designing chart structures for your team.

The picture below shows the layout of a chart called myapp. Two entries are required: Chart.yaml, the chart's metadata, and the templates/ folder. The rest are optional, but each has a role Helm enforces.

Key concepts

  • Chart.yaml: version vs appVersion
  • apiVersion: v2
  • templates/_helpers.tpl
  • crds/ directory constraints
  • NOTES.txt
  • Library charts (type: library)

Interview questions

  • Describe the complete directory structure of a Helm chart and the role of each file.
  • What is the purpose of _helpers.tpl and how are named templates called?
  • Why are CRDs in the crds/ directory, and what are the implications for upgrade management?
  • How does values.schema.json work and what does it validate?
  • What does helm create generate and what would you typically remove or modify?

Sign up free to read the full topic

More DevOps topics

Start free on Cariara · Coding problems · System design studio