Helm
Charts, values and releases β the model behind helm upgrade, the template language in the forms you actually write, dependencies and distribution, hooks and tests, and the failures that only appear on the second deploy.
Stage 1 β Charts & Releases
4 lessonsThe three jobs Helm actually does, why Helm 3 removed the in-cluster server, and how a release revision lives in a Secret you can inspect with kubectl.
What every file in a chart is for, why version and appVersion move independently, and the two directories with special rules β charts/ and crds/.
Revisions as an append-only log, the four flags that make an upgrade survivable, and the honest limits of what a rollback can undo.
The exact order in which values sources override each other, why lists replace rather than merge, and how to design a values interface somebody else can use.
Stage 2 β Templating
4 lessonsGo templates as Helm uses them: the built-in objects, actions and whitespace control, and why indentation is where most rendering failures live.
The Sprig functions worth memorising, why include beats template in every case that matters, and how to build a helpers file other charts can reuse.
if, with and range in the forms you will actually write β plus the scope rebinding that causes the most confusing error message in Helm.
Four failure stages with four different tools β knowing whether you are looking at a values problem, a render problem, an API rejection or a runtime failure.
Stage 3 β Dependencies & Distribution
3 lessonsDeclaring subcharts, overriding their values from the parent, what global actually shares β and why one umbrella release means one failure domain.
Turning a directory into a versioned artifact, publishing to an OCI registry rather than an index.yaml, and giving consumers something they can actually verify.
Where each hook runs, why a rollback cannot undo one, and how ten lines of chart test turn a green deploy into a verified one.
Stage 4 β Production Operations
3 lessonsThe three-way merge that reverts your kubectl edits, the immutable fields no patch can change, and how to clear a release stuck in pending-upgrade.
Why a password in a values file leaks four ways, the three mechanisms that keep it out, and how to layer environments without letting them drift.
Three ways a chart reaches a cluster, what each gives up, and the chart-testing pipeline that catches a broken chart before anyone installs it.
Stage 5 β Capstone
1 lessonBuild a chart somebody else could operate β schema, subchart, hooks, tests, signed and published β then put it through nine drills including the ones that fail.
πΊοΈ Beginner β Expert Roadmap
5 stages with prerequisites and a concrete mastery check at each.
π― What You'll Learn
- β’ Describe Helm as three jobs β template engine, package format and release manager β and say which one you cannot replace with a script.
- β’ Find a release's state with kubectl alone, and read the manifest out of a revision Secret.
- β’ Name what every file in a chart is for, and why version and appVersion move independently.
- β’ Predict which values source wins, and explain why a list override replaces rather than merges.
- β’ Write templates whose whitespace and indentation are deliberate, not trial and error.
- β’ Use include rather than template, and know exactly why the difference matters.
- β’ Recover from the scope error that with and range cause, and reach the root with $.
- β’ Diagnose a chart failure at the right stage β values, render, API server or runtime.
- β’ Wire subcharts with conditions and global values, and accept the one-release coupling knowingly.
- β’ Publish a signed chart to an OCI registry and let a consumer verify it.
- β’ Place hooks correctly, keep their failure evidence, and design migrations that survive a rollback.
- β’ Explain the three-way merge that reverts a kubectl edit, and handle an immutable-field rejection.
- β’ Clear a release stuck in pending-upgrade without deleting the workload.
- β’ Keep secrets out of values files, and know what SOPS does and does not protect.
- β’ Choose between pipeline-driven and GitOps delivery on drift detection rather than preference.
- β’ Ship a chart somebody else can operate, proven by nine drills including the ones that fail.
π‘οΈ Best Practices in Production
The short version of this path. Every lesson also ends with the specific mistake it exists to prevent.
- β Design
values.yamlas a public interface: document every key, and validate it withvalues.schema.json. - β Derive every resource name from
.Release.Nameso the chart can be installed twice in one namespace. - β Keep
selectorLabelsinvariant β a Deployment's selector is immutable. - β Use
includerather thantemplate, andnindentrather thanindent. - β Upgrade with
--atomic --timeout, and runhelm diff upgradebefore every production change. - β Pin dependencies, commit
Chart.lock, and usehelm dependency buildin CI. - β Publish signed charts to an OCI registry, and install by version or digest.
- β Add
templates/tests/that exercise the real contract, and runhelm testin CI.
- β Secrets in a values file β they reach Git, the release Secret and every
helm get values. - β Expecting a list override to merge. Lists always replace, entirely.
- β Generating passwords with
randAlphaNumwithout alookupguard β they rotate on every upgrade. - β A migration hook that is not backward compatible. Rollback restores manifests, never your schema.
- β Missing
before-hook-creationon a hook Job, which fails the second upgrade on an immutable field. - β Templating
replicaswhile an HPA manages the same Deployment.