Helm in Depth — From Charts to a Platform Library›01 · Releases, upgrades and rollbacks

Lesson 01 of 10 · How Helm works

Releases, upgrades and rollbacks

What Helm actually stores when it installs a release, how an upgrade decides what to change, what a rollback really does, and the flags that make upgrades safe in pipelines.

Practitioner
Key wordschartreleaserevisionrelease SecretChart.yamlversion vs appVersionthree-way mergehelm upgrade --install--atomic--wait--reuse-valueshelm rollbackhelm history

Charts and releases

  • A chart is a package: Chart.yaml (name, version of the chart, appVersion of the software), values.yaml (defaults), templates/, optional values.schema.json, crds/ and charts/ (dependencies).
  • A release is one installed instance of a chart, with a name, in a namespace. The same chart can be installed many times.
  • Every install, upgrade or rollback creates a revision. Helm 3 stores each revision (manifest, values, chart metadata, status) as a Secret in the release's namespace.

A chart is a recipe; a release is a cake made from it in a particular kitchen. Every time you change the cake, the kitchen keeps a photo and the exact recipe used (a revision), so you can go back to an earlier version.

Bump version on every chart change, and appVersion when the packaged software changes.

What an upgrade does

1. Render templates with the merged values (chart defaults ← -f files in order ← --set).
2. Compare three things: the previous release's manifest, the live objects, the new manifest
   (a three-way merge), and patch only what changed.
3. Run hooks if any, wait if asked, record a new revision with status deployed or failed.

The three-way merge means a field someone changed by hand in the cluster is handled sensibly: if the chart didn't change that field, the live value is usually kept; if it did, the chart wins.

Flags that matter in pipelines

Flag Why
upgrade --install One command for first install and every later upgrade
--wait / --timeout Don't report success until resources are ready
--atomic On failure, roll back automatically (implies --wait)
-f base.yaml -f prod.yaml Explicit, reviewable values; later files win
--reset-values vs --reuse-values Reuse keeps old values and hides new chart defaults; prefer passing all files every time
--dry-run=server / helm diff Preview against the live cluster before applying

What rollback does, and doesn't

helm rollback orders 3 re-applies revision 3's manifest as a new revision. It does not:

  • undo database migrations or data written by the new version;
  • change CRDs installed from crds/;
  • restore resources that were deleted outside Helm.

So releases should be backward compatible (expand/contract database changes), and with GitOps the rollback is a git revert, not helm rollback (lesson 7).

Try it

On a kind cluster, helm upgrade --install web oci://ghcr.io/stefanprodan/charts/podinfo -n web --create-namespace. Change replicaCount twice with --set, run helm history web -n web, then roll back to revision 1 and look at the history again: the rollback is revision 4. List the release Secrets with the cheat-sheet command.

Recap

  • A release is a named install of a chart; each revision is a Secret in the namespace.
  • Upgrades render, three-way merge and record a revision; use upgrade --install, --atomic, --wait and explicit values files.
  • Rollback re-applies an old manifest as a new revision and does not undo data or CRD changes.

This site is a public version of my personal engineering knowledge hub. It intentionally excludes confidential company information and internal operational details.