Understanding Helm charts
Templated Kubernetes — apt for clusters.
What a chart contains, the values.yaml override model, and the install-upgrade-rollback cycle that beats hand-edited manifests.
What a chart is.
A Helm chart is a folder of templated Kubernetes manifests, plus a values file that parameterises them, plus a Chart.yaml with metadata. helm install myrelease ./mychartrenders the templates with the values, applies the resulting YAML to a cluster, and remembers the release. The chart can be packaged into a .tgz and pushed to a chart repository for sharing.
The standard layout.
Chart.yaml — name, version, description. values.yaml — default parameter values. templates/ — the Kubernetes YAML with Go template syntax. templates/_helpers.tpl — named template fragments. Optional:charts/ for sub-charts, tests/ for chart unit tests,crds/ for custom resource definitions. The layout is convention; Helm enforces only Chart.yaml and templates/.
Template language.
Go's text/template with Helm's added Sprig functions. {{ .Values.replicaCount }}inserts a value. {{- if .Values.ingress.enabled }} conditional;{{- range .Values.containers }} loop. The - trims whitespace. The template language is full Turing-complete which makes powerful charts possible and ugly charts inevitable. Reach for templating only when the YAML can't express the variation itself.
Values override.
The values.yaml shipped with the chart provides defaults. On install, the user passes --values prod.yaml or --set replicaCount=5 to override. The merge is deep — only the keys you set are changed. Charts should ship sensible defaults so helm install with no flags produces something runnable; per-environment overrides go in separate files per environment.
A worked install.
helm install api ./charts/myapp --values prod.yaml. Helm renders ~20 manifests (Deployment, Service, Ingress, ConfigMap, ServiceAccount, NetworkPolicy, HPA, ...), applies them all, records release v1. Edit values, runhelm upgrade api ./charts/myapp --values prod.yaml — Helm diffs the new rendered output against the live state, applies the changes, records v2. Something breaks: helm rollback api 1 reverts to the previous render. The three-command upgrade-rollback story is what makes Helm worth the YAML.
install + upgrade + rollback
3 commands
Render → apply → record release.
helm install ; helm upgrade ; helm rollback
= Versioned releases
vs Kustomize vs raw YAML.
Raw YAML: simplest, but every environment is a copy with diff drift. Kustomize: patches applied to base manifests, no templates, in-tree with kubectl. Helm: templates with values, package-and-install model, separate tool. Kustomize wins for simple environment overlays; Helm wins for chart distribution (Prometheus, cert-manager, Argo CD all ship as Helm charts because they need to fit many users' configurations). A team often uses both — Kustomize for own services, Helm for third-party.