CoursesHelmBeginner

Chart structure

Chart.yaml, templates, values.

Intermediate12 min · lesson 3 of 12

A chart is a directory with a required layout. Chart.yaml holds metadata (name, version, appVersion, dependencies). templates/ contains the templated Kubernetes manifests. values.yaml holds the default configuration. Optional pieces: charts/ for bundled subcharts, templates/_helpers.tpl for reusable template snippets, and values.schema.json to validate values. helm create scaffolds the whole thing.

chart layout
mychart/
Chart.yaml # name, version, appVersion, dependencies
values.yaml # default configuration
values.schema.json # (optional) validate values
templates/
deployment.yaml # templated manifests
service.yaml
_helpers.tpl # named template helpers
NOTES.txt # post-install message
charts/ # subcharts (dependencies)

Two versions in Chart.yaml

A frequent point of confusion: Chart.yaml has both version (the chart’s own version — bump it when you change the chart) and appVersion (the version of the application it deploys, e.g. the container image tag). They move independently: you might release chart version 1.4.0 that still deploys app 2.1.0. Semantic versioning the chart is what lets consumers pin and upgrade predictably.

Chart.yaml
apiVersion: v2
name: payments-api
version: 1.4.0 # the chart version (bump on chart changes)
appVersion: "2.1.0" # the app/image version it deploys
description: The payments API service
type: application
templates/ renders as Kubernetes YAML — mind the whitespace
Everything in templates/ is passed through the Go template engine and must render to valid Kubernetes YAML, where indentation is meaningful. A template that emits mis-indented output produces a manifest Kubernetes rejects, often with a confusing error. Use helm template to see the rendered YAML, and the indent/nindent helpers (functions lesson) to control whitespace precisely.