Most CKAD candidates can run helm install and helm upgrade. Far fewer can say what Helm wrote to the cluster when they did, why an upgrade silently dropped the value they set last week, why helm rollback restored a replica count that nobody had changed in the chart, why a Job created by a hook was still there after helm uninstall, or why helm upgrade fails with “removed kubernetes api(s)” on a cluster that was upgraded last night. The CKAD curriculum (v1.37) lists “Use the Helm package manager to deploy existing packages” under the 20% Application Deployment domain, and the exam environment runs Kubernetes v1.37. The task will not be “explain Helm”; it will be “install this chart into that namespace with these values, then fix what went wrong”, and fixing it fast requires knowing the mechanism.
Our Helm and Kustomize guide covers the lifecycle commands and the exam-day workflow and assumes Helm is a black box. This post opens the box: the chart format field by field, how templates render, the exact values precedence and --set grammar, the Secret a release is stored in, revisions and the three-way merge that drives upgrades and rollbacks, the flags that make upgrades safe, hooks and tests, CRDs, OCI registries, and the flag renames you must recognise now that Helm 4 is current. Everything is verified against the Helm documentation and source as of November 2026, when the latest releases are Helm v4.3.2 and v3.22.1.
Which Helm Version Is on the Exam?
The Linux Foundation publishes the Kubernetes version of the CKAD environment (v1.37, realigned 4 to 8 weeks after each minor release) but does not publish the Helm version. Helm 4.0 shipped in November 2025; Helm 3 still receives releases. The Helm version-skew table says Helm 4.3.x supports Kubernetes 1.37 down to 1.34 and Helm 4.2.x supports 1.36 to 1.33, so a v1.37 exam cluster is most plausibly paired with a Helm 4.2 or later binary, but you should be fluent in both naming schemes. Run helm version as the first command of any Helm task. The differences that matter for an application developer are small and are collected in the Helm 3 vs Helm 4 table near the end; charts written for Helm 3 work unchanged in Helm 4.
The Chart: Files and the Chart.yaml Contract
A chart is a directory named after the chart (without the version) with this layout:
wordpress/
Chart.yaml # required metadata
LICENSE # optional
README.md # optional
values.yaml # default configuration values
values.schema.json # optional JSON Schema for values
charts/ # dependency charts (unpacked dirs or .tgz)
crds/ # CustomResourceDefinitions, plain YAML, never templated
templates/ # Go templates rendered with the values
templates/NOTES.txt # optional usage notes, printed after install and by helm status
Helm reserves charts/, crds/ and templates/; anything else is carried along untouched and is reachable through .Files. helm package turns the directory into <name>-<version>.tgz, and helm pull downloads a published chart without installing it (--untar to inspect it).
Chart.yaml field by field
apiVersion: v2 # required: v2 for Helm 3+ charts; v1 charts still install
name: wordpress # required
version: 1.2.3 # required, SemVer 2; becomes the package name wordpress-1.2.3.tgz
kubeVersion: ">= 1.30.0" # optional SemVer constraint checked at install
description: ...
type: application # application (default, installable) or library (not installable)
appVersion: "6.5.0" # informational; quote it
deprecated: false
dependencies:
- name: mariadb
version: "18.x"
repository: "https://charts.example.com" # URL or "@alias" of a helm repo add alias
condition: mariadb.enabled # YAML path(s) in the parent's values
tags: [database]
alias: db # install the same chart twice under two names
import-values: [...]
maintainers: [...]
icon: https://...
annotations: {...} # custom metadata goes here; unknown fields are rejected since v3.3.2
Rules the exam-level reader needs:
versionis the chart version,appVersionis the application’s version. Onlyversionparticipates in packaging and repository lookups;appVersionis informational and should be quoted because YAML would otherwise parse1.0as a float or1234e10as scientific notation.versionmust be SemVer 2 (1.2.3,1.2.3-alpha.1+ef365); Helm coercesv1.2intov1.2.0but rejects anything else.kubeVersiontakes constraints such as>= 1.13.0 < 1.15.0,||alternatives, hyphen ranges (1.1 - 2.3.4), wildcards (1.2.x), tilde (~1.2.3allows patch changes) and caret (^1.2.3allows minor changes). Helm refuses to install when the cluster does not match.apiVersion: v2moved dependencies from the oldrequirements.yamlintoChart.yamland introducedtype.- A library chart (
type: library) provides named templates for other charts, is not installable, and renders none of its own resources; application charts consume it as a dependency and call its definitions withinclude. - Unknown fields are dropped from the
.Chartobject, soChart.yamlcannot smuggle arbitrary data into templates; values can.
Dependencies: condition, tags, alias and import-values
helm dependency update (alias helm dep up) reads dependencies, downloads each chart into charts/ as <name>-<version>.tgz, and records the resolved versions in Chart.lock; helm dependency build reconstructs charts/ from the lock file. --dependency-update on install/upgrade does the download inline. The repository is a URL that must also have been added with helm repo add, or @name referring to that alias.
Three dependency fields control whether and how a subchart loads:
conditionholds one or more comma-separated YAML paths (subchart1.enabled,global.subchart1.enabled). If a path exists in the top parent’s values and resolves to a boolean, the subchart is enabled or disabled accordingly. Only the first valid path is evaluated; if none exists, the condition has no effect.tagslabel a subchart; in the parent’s values a top-leveltags:map enables or disables every chart carrying that tag. A chart is enabled if any of its tags is true.- Conditions always override tags. Both must be set in the top parent’s values, and
tags:must be a top-level key. On the command line:--set tags.front-end=true --set subchart2.enabled=false. aliasinstalls the same chart more than once under different names (new-subchart-1,new-subchart-2).import-valuespulls a child’s values up into the parent: either keys from the child’sexports:block, or explicitchild:/parent:path pairs.
Operationally, a chart and all of its dependencies become one release: Helm aggregates every object from every chart, sorts them by kind in its fixed install order (namespaces, then network and quota objects, then ServiceAccounts, Secrets and ConfigMaps, then storage, then RBAC, then Services, then workloads, with Ingress and APIService near the end) and then by name, and creates them in that order. There is no per-subchart ordering.
How Templates Render
Everything under templates/ is passed through the Go text/template engine with the Sprig function library (minus env and expandenv, removed for security) plus Helm’s own include, required, tpl, lookup, toYaml and friends. helm template <release> <chart> renders locally with cluster lookups faked; helm install --dry-run=server renders with cluster access.
The built-in objects
| Object | What it holds |
|---|---|
.Release | .Name, .Namespace, .Revision (1 on install, +1 per upgrade or rollback), .IsInstall, .IsUpgrade (true for upgrades and rollbacks), .Service (always Helm) |
.Values | The merged values (see precedence below); empty by default |
.Chart | The parsed Chart.yaml: .Chart.Name, .Chart.Version, .Chart.AppVersion, .Chart.Maintainers |
.Subcharts | The scopes of subcharts, e.g. .Subcharts.mySubChart.myValue |
.Files | Non-template files: .Files.Get, .GetBytes, .Glob, .Lines, .AsSecrets (Base64), .AsConfig (YAML map) |
.Capabilities | .APIVersions.Has "batch/v1" or "apps/v1/Deployment", .KubeVersion (.Major, .Minor, .Version), .HelmVersion |
.Template | .Name (e.g. mychart/templates/deployment.yaml) and .BasePath |
Built-ins start with a capital letter; chart authors conventionally use lower-case names for their own values to tell them apart.
Partials, _helpers.tpl and include vs template
Files whose name begins with an underscore (_helpers.tpl) are not rendered as manifests; they hold {{ define "mychart.fullname" }}...{{ end }} named templates. Template names are global across the chart and every subchart, so the convention is to prefix them with the chart name. Call a named template with include, not the Go template action, because include returns a string that can be piped:
metadata:
labels:
{{- include "mychart.labels" . | nindent 4 }}
The {{- ... | nindent n }} pattern chomps the preceding whitespace and re-indents the included block, which is how multi-line YAML snippets land at the right indentation. Other functions that appear in exam-grade charts: quote (strings) versus leaving integers unquoted, default "x" .Values.y, required "message" .Values.z (fails rendering with your message when the value is empty), toYaml .Values.resources | nindent 12, tpl (evaluates a string from values as a template, for example a config file that references .Release.Name), and lookup "v1" "Secret" "ns" "name" (reads a live object; returns an empty value when nothing exists, and returns nothing at all under helm template or --dry-run=client). The checksum/config annotation trick, {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}, rolls a Deployment whenever its ConfigMap template changes; randAlphaNum in an annotation rolls it on every upgrade because random functions re-execute on each render.
values.schema.json
If present, the schema is validated against the final merged .Values (not just values.yaml) on helm install, helm upgrade, helm lint and helm template, and every subchart’s schema is checked too, so a parent cannot circumvent a subchart’s constraints. --skip-schema-validation disables it, documented for air-gapped clusters whose schemas use remote references.
Values Precedence and the —set Grammar
Four sources feed .Values, listed from least to most specific:
- the chart’s own
values.yaml, - a parent chart’s
values.yaml(for a subchart), - files passed with
-f/--values(several allowed; the right-most file wins for a key set in both), --set,--set-string,--set-file,--set-jsonand--set-literal(several allowed; the right-most wins).
Subchart values are namespaced in the parent and pruned in the child: the parent sees .Values.mysql.password, the mysql subchart sees .Values.password, and a subchart can never read its parent’s keys. The only shared channel is global:, which is copied downward into every subchart’s .Values.global (parent globals win over subchart globals; nothing flows upward).
The --set grammar is exact and worth memorising because the exam gives you no time to debug it:
| You type | Helm produces |
|---|---|
--set a=b,c=d | two top-level keys (comma separates pairs) |
--set outer.inner=value | nested map |
--set name={a,b,c} | a list |
--set servers[0].port=80,servers[0].host=example | list element by index |
--set a=null | deletes key a from the merged values (how you remove a default such as livenessProbe.httpGet) |
--set name=[] | an empty list |
--set name=value1\,value2 | the string value1,value2 (backslash escapes the comma) |
--set nodeSelector."kubernetes\.io/role"=master | a key containing a dot |
--set-string tag=1.10 | forces a string where --set would parse a number |
--set-file config=./app.conf | value is the file’s contents |
--set-json 'resources={"limits":{"cpu":"1"}}' | a JSON object, array or scalar |
--set values are converted to YAML on the client and merged like a values file. helm get values <release> prints the user-supplied values of the current revision, helm get values -a prints the fully computed values, and --revision n reads an older revision; helm show values <chart> prints the chart’s defaults, which is the fastest way to see the keys a chart exposes before you install it.
The —reuse-values trap on upgrade
When you helm upgrade without any -f or --set, Helm reuses the previous revision’s user-supplied values. When you supply any new value, the previous user-supplied values are not carried forward by default: Helm starts from the chart defaults and applies only what you passed now. That is why a release that had replicaCount=3 from a --set last week drops back to the chart default when today you run helm upgrade --set image.tag=2.0. The three flags that control this:
| Flag | Behaviour |
|---|---|
--reset-values | Ignore the last release’s values; use the chart’s defaults plus what you pass now |
--reuse-values | Start from the last release’s values and merge your new -f/--set on top (ignored if --reset-values is set). The trap in the other direction: a new chart version’s new defaults are not picked up |
--reset-then-reuse-values | Chart defaults first, then the last release’s values, then your overrides: new defaults and old overrides survive (ignored if either flag above is set) |
The safe habit on the exam: keep your overrides in a file and pass -f values.yaml on every upgrade, so the question of reuse never arises.
Where a Release Lives: Secrets, Revisions and History
Since Helm 3 there is no server-side component; the Helm CLI stores each revision of a release as a Kubernetes object in the release’s namespace. By default that object is a Secret named sh.helm.release.v1.<release-name>.v<revision> of type helm.sh/release.v1, labelled name=<release>, owner=helm, status=<status>, version=<revision>, plus createdAt/modifiedAt, and holding one data key release whose value is the release object (chart, values, rendered manifest, hooks, info) gzipped and Base64-encoded, with the Secret’s own Base64 layer on top:
kubectl get secret -n web -l owner=helm,name=shop
# NAME TYPE DATA AGE
# sh.helm.release.v1.shop.v1 helm.sh/release.v1 1 2d
# sh.helm.release.v1.shop.v2 helm.sh/release.v1 1 1d
kubectl get secret -n web sh.helm.release.v1.shop.v2 \
-o jsonpath='{.data.release}' | base64 -d | base64 -d | gunzip | jq .info.status
Consequences you can reason from:
- Release names are scoped to the namespace, so
helm install wordpress ...can exist in two namespaces;helm listis namespaced too (-Afor all namespaces). - Because the record contains the rendered manifest and all values, it may contain secrets; the
HELM_DRIVERenvironment variable switches the backend toconfigmaporsql(PostgreSQL), and RBAC on Secrets in the namespace is what protects release history. helm history <release>lists revisions with statussuperseded,deployed,failedand so on, up to 256 by default (--max), and--show-rollback-revisionadds a column showing which revision each rollback targeted.--history-maxonupgradeandrollbackcaps the revisions retained per release at 10 by default (0 means unlimited); when a new revision is created Helm deletes the least recent ones beyond the cap, which is why an old revision you want to roll back to may no longer exist.- Release statuses:
deployed,superseded,failed,uninstalled,uninstalling,pending-install,pending-upgrade,pending-rollback,unknown. A release stuck inpending-upgrade(a killedhelm upgrade) blocks the next upgrade until you roll back or delete that revision’s Secret.
helm uninstall removes the resources and the release history unless you pass --keep-history, in which case the record stays with status uninstalled, helm list --uninstalled shows it, and helm rollback can bring it back. Without --keep-history, an uninstalled release cannot be rolled back. --cascade background|foreground|orphan sets the Kubernetes deletion propagation for dependents (orphan still deletes the Deployment but leaves its ReplicaSets, which our garbage collection post explains), --wait with --cascade foreground blocks until finalizers complete, and --ignore-not-found makes a missing release a success. A resource annotated helm.sh/resource-policy: keep survives uninstall, upgrade and rollback deletions, but becomes orphaned: Helm no longer manages it.
Upgrades and Rollbacks: Revisions, Three-Way Merge and Server-Side Apply
Every helm install, helm upgrade and helm rollback creates a new revision (install is revision 1). helm rollback <release> [revision] rolls back to the named revision; omitting it or passing 0 rolls back to the previous revision, and the rollback itself becomes a new revision with description “Rolled back to N”. So after install (1), upgrade (2), rollback to 1 (3), the live state matches revision 1 but the current revision number is 3.
Three-way strategic merge
Helm 2 compared the old manifest with the new manifest. Helm 3 generates its patch from three inputs: the old manifest, the live state, and the new manifest. The documented example is the one the exam loves: a Deployment installed with replicas: 3, scaled to 0 with kubectl scale, then helm rollback. The old and new manifests are identical, so Helm 2 did nothing and the site stayed down; Helm 3 sees old = 3, live = 0, new = 3 and patches the replica count back. The same logic keeps a sidecar injected by a mesh in place during an upgrade, because the live state is part of the computation.
Helm 4: server-side apply
Helm 4 can hand the merge to the API server. helm install defaults to server-side apply (--server-side true); helm upgrade and helm rollback default to auto, which follows the apply method of the previous revision, so a release created by Helm 3 keeps client-side apply after you move to Helm 4 until you explicitly set --server-side=true. Field-manager conflicts surface as errors unless you pass --force-conflicts. A resource that already exists in the cluster and is not owned by the release fails with “resource already exists and is not owned by this release”; ownership is tracked by the annotations meta.helm.sh/release-name and meta.helm.sh/release-namespace plus the app.kubernetes.io/managed-by: Helm label, and --take-ownership on install or upgrade adopts the existing objects into the release (the documented route for migrating hand-applied manifests into a chart).
The flags that make upgrades safe
| Flag | Helm 3 | Helm 4 | What it does |
|---|---|---|---|
-i, --install | ✓ | ✓ | Install if the release does not exist, otherwise upgrade: the idempotent helm upgrade --install pattern; --create-namespace applies only with --install |
--atomic | ✓ | deprecated alias | On install, delete the installation on failure; on upgrade, roll back to the last successful release. Implies --wait |
--rollback-on-failure | — | ✓ | The new name for --atomic; defaults --wait to the watcher strategy |
--wait | boolean: wait until Pods, PVCs, Services and the minimum Pods of Deployments/StatefulSets/ReplicaSets are ready, up to --timeout; on timeout the release is marked failed | --wait alone = watcher (kstatus-based readiness); explicit hookOnly (the default when the flag is omitted) or legacy (the Helm 3 logic) | Note the Helm 3 caveat: a Deployment with replicas: 1 and maxUnavailable not 0 satisfies the “minimum ready” check immediately |
--wait-for-jobs | ✓ | ✓ | With --wait, also wait for Jobs to complete |
--timeout | 5m0s | 5m0s | Time allowed for each individual Kubernetes operation, including hook Jobs |
--force | ✓ | deprecated alias | Update by delete-and-recreate instead of patching |
--force-replace | — | ✓ | The new name for --force; --force-conflicts is the separate server-side-apply override |
--cleanup-on-fail | ✓ | ✓ | Delete resources newly created by a failed upgrade or rollback |
--dry-run | --dry-run (= client) or --dry-run=server | `—dry-run=none | client |
--hide-secret | ✓ | ✓ | Hide Secret contents in dry-run output |
--no-hooks | ✓ | ✓ | Skip hooks for this operation |
--description | ✓ | ✓ (also on rollback) | Free-text revision description shown in helm history |
--skip-crds | ✓ | ✓ | Do not install crds/ on install or upgrade --install |
--version | ✓ | ✓ | Chart version constraint (1.1.1, ^2.0.0); --devel includes pre-releases |
--take-ownership | 3.x late | ✓ | Adopt existing unowned resources |
--post-renderer | path to an executable | plugin name | Transform rendered manifests (for example with Kustomize) before applying |
The --timeout applies per operation, so a hook Job that takes six minutes fails a release with the default five-minute timeout even though the rest of the chart was fine.
Hooks, Hook Weights and helm test
A hook is an ordinary template whose resource carries the helm.sh/hook annotation. The nine hook points:
| Hook | Runs |
|---|---|
pre-install | after templates render, before any resource is created |
post-install | after all resources are loaded |
pre-upgrade / post-upgrade | before resources are updated / after all are upgraded |
pre-rollback / post-rollback | before / after a rollback modifies resources |
pre-delete / post-delete | before any resource is deleted / after all are deleted |
test | when helm test runs |
The crd-install hook from Helm 2 is gone; CRDs use the crds/ directory. Rules:
- One resource can implement several hooks:
"helm.sh/hook": post-install,post-upgrade. Any number of resources can share a hook. Subchart hooks also run and cannot be disabled by the parent. helm.sh/hook-weightis a string ("-5","0","5"), default 0; hooks are sorted by weight ascending, then by kind, then by name, and executed serially. Set it explicitly even when it is 0.- If the hook resource is a Job or Pod, Helm blocks until it completes, and a failed hook fails the release. Any other kind counts as ready as soon as it is loaded.
- With
--wait,post-installhooks run only after all release resources are ready. - Hook resources are not tracked as part of the release:
helm uninstalldoes not delete them. Control their lifetime withhelm.sh/hook-delete-policy:before-hook-creation(delete the previous hook resource before creating a new one, the default),hook-succeeded,hook-failed, or a combination. A Job’sttlSecondsAfterFinishedis the Kubernetes-side alternative. Hook resources that must never be deleted gethelm.sh/resource-policy: keep.
A test is a hook: a Pod or Job under templates/ (conventionally templates/tests/) annotated helm.sh/hook: test whose container must exit 0. helm test <release> runs them (--logs prints the Pod logs, --filter name=... selects tests), and helm create scaffolds a test-connection.yaml that wgets the Service. The legacy annotation test-success is still accepted.
A minimal post-install hook:
apiVersion: batch/v1
kind: Job
metadata:
name: "{{ .Release.Name }}-migrate"
annotations:
"helm.sh/hook": post-install,post-upgrade
"helm.sh/hook-weight": "0"
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
spec:
template:
spec:
restartPolicy: Never
containers:
- name: migrate
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
command: ["./migrate"]
CRDs: The crds/ Directory Rules
CRDs placed in crds/ are plain YAML with no template directives, uploaded before the template engine runs so that templates can create instances of the new kinds and .Capabilities.APIVersions.Has sees them. Because CRDs are cluster-global, Helm is deliberately conservative: CRDs are never reinstalled if already present (whatever their version), never installed on upgrade or rollback, and never deleted on uninstall. Upgrading a CRD is therefore a manual kubectl apply step, and --skip-crds skips the install entirely; helm template --include-crds renders them for inspection. Our CRDs and operators post covers what happens after the CRD exists.
Repositories and OCI Registries
Classic repositories are HTTP servers with an index.yaml: helm repo add bitnami https://charts.bitnami.com/bitnami, helm repo update, helm search repo nginx --versions, then install bitnami/nginx. helm search hub queries Artifact Hub instead of your local repository list. Helm 3 ships with no default repository.
OCI registries are the recommended distribution channel. helm registry login <host> (Helm 4 accepts the hostname only, no scheme or path), helm push mychart-0.1.0.tgz oci://registry.example.com/charts (push takes a packaged .tgz, and the reference must not include the chart name or tag, which are inferred from Chart.yaml), then helm pull, helm show, helm template, helm install and helm upgrade all accept oci://registry.example.com/charts/mychart --version 0.1.0, where the chart name is part of the reference. Helm 4 adds installs by digest (oci://.../app@sha256:...), refusing a chart whose digest does not match. A .prov provenance file next to the .tgz is uploaded automatically.
The Removed-API Upgrade Failure
A release whose stored manifest uses an API version the cluster no longer serves fails to upgrade with:
Error: UPGRADE FAILED: current release manifest contains removed kubernetes api(s)
for this kubernetes version and it is therefore unable to build the kubernetes
objects for performing the diff. error from kubernetes: unable to recognize "":
no matches for kind "Deployment" in version "apps/v1beta1"
Helm needs to parse the stored manifest to compute the three-way patch, and the Kubernetes client library can no longer decode the removed kind. The documented procedure: audit releases with helm get manifest before upgrading the cluster, upgrade to a chart version with supported APIs, and never roll back to a revision older than that fix. If the cluster was upgraded first, the stored manifest must be rewritten, which the mapkubeapis plugin does for you. Our API deprecations guide covers the Kubernetes side of this.
Helm 3 vs Helm 4: What Actually Changed for a CKAD Candidate
| Area | Helm 3 | Helm 4 |
|---|---|---|
| Rollback on failed install/upgrade | --atomic | --rollback-on-failure (--atomic still accepted with a deprecation warning) |
| Replace instead of patch | --force | --force-replace (--force deprecated); --force-conflicts for SSA conflicts |
--wait | boolean | strategy: watcher (when --wait is given), hookOnly (default when omitted), legacy |
| Apply method | three-way strategic merge patch, client side | server-side apply by default on install; auto on upgrade/rollback follows the previous revision |
--dry-run | client (default) or server | none (default), client, server |
| Post-renderer | path to any executable | a post-renderer plugin |
helm registry login | accepted URLs | hostname only |
| Install by digest | — | oci://...@sha256:... |
| Values files | one YAML document | multi-document values files |
helm history | — | --show-rollback-revision column; helm rollback --description |
| Charts | apiVersion: v2 | v2 unchanged; experimental charts v3 behind HELM_EXPERIMENTAL_CHART_V3 |
| Kubernetes support | n-3 per release | 4.3.x: 1.37–1.34; 4.2.x: 1.36–1.33; 4.1.x: 1.35–1.32; 4.0.x: 1.34–1.31 |
Everything else you use in the exam (install, upgrade --install, rollback, uninstall, history, get values, show values, template, lint, repo, search, hooks, --set grammar, release Secrets) is the same.
An Exam-Speed Helm Workflow
helm version --short # know which flag names apply
helm repo add bitnami https://charts.bitnami.com/bitnami && helm repo update
helm search repo bitnami/nginx --versions | head # pick a chart version
helm show values bitnami/nginx --version 18.2.4 > v.yaml # discover keys
helm install web bitnami/nginx -n apps --create-namespace \
--version 18.2.4 -f v.yaml --set replicaCount=2
helm list -n apps; helm status web -n apps
helm upgrade web bitnami/nginx -n apps --version 18.2.5 -f v.yaml --set replicaCount=2
helm history web -n apps
helm rollback web 1 -n apps # or omit the revision = previous
helm get values web -n apps; helm get manifest web -n apps | head
helm template web ./mychart --debug | less # render locally; lookup is faked
helm uninstall web -n apps --keep-history
Two reflexes save minutes: always pass -n (release records are namespaced, and helm list without -n only shows the current namespace), and render with helm template or --dry-run=server before touching the cluster when a task gives you a values file you did not write.
A Hands-On Lab
helm create demo, readtemplates/_helpers.tplandtemplates/NOTES.txt, and runhelm template demo ./demo --set replicaCount=2 | grep -A2 replicas.- Install it (
helm install demo ./demo -n lab --create-namespace) and inspect the release Secret:kubectl get secret -n lab -l owner=helmand decode.data.releasetwice plusgunzipto see the stored manifest. - Upgrade with
--set image.tag=1.27.0, then upgrade again with only--set replicaCount=3and runhelm get values demo -n lab: the tag is gone. Repeat with--reuse-valuesand then with--reset-then-reuse-valuesand compare. kubectl scale deploy demo -n lab --replicas=0, thenhelm rollback demo -n laband watch the replica count return (three-way merge). Runhelm history demo -n lab --show-rollback-revision(Helm 4).- Add the migration hook Job above with
hook-delete-policy: hook-succeeded, upgrade, and confirm the Job disappears; remove the policy, upgrade, and confirm the Job surviveshelm uninstall. - Run
helm upgrade --install demo ./demo -n lab --atomic(or--rollback-on-failureon Helm 4) with--set image.tag=does-not-exist --wait --timeout 60sand observe the automatic rollback and thefailed/supersededentries in history. - Put a plain CRD in
crds/, install, bump the CRD’s version in the file, upgrade, and confirm the cluster’s CRD did not change. helm package demo,helm push demo-0.1.0.tgz oci://localhost:5000/charts(a local registry), thenhelm install demo2 oci://localhost:5000/charts/demo --version 0.1.0 -n lab.
Scenario Cues → Mechanism
| Scenario | Mechanism |
|---|---|
| Value set on a previous upgrade vanished | Upgrade with new values does not reuse old user values; --reuse-values or keep a values file |
New chart defaults not applied after --reuse-values | --reset-then-reuse-values |
Remove a default key such as livenessProbe.httpGet | --set key=null |
--set tag=1.10 became a number | --set-string |
| Key contains a dot or value contains a comma | Backslash escape (kubernetes\.io/role, a\,b) |
| “Install or upgrade” idempotently in one command | helm upgrade --install (+ --create-namespace) |
| Failed upgrade must auto-revert | --atomic / --rollback-on-failure (implies --wait) |
| Hook Job takes 8 minutes and release fails | --timeout (default 5m0s) |
kubectl scale change undone by rollback | Three-way strategic merge uses live state |
| ”resource already exists and is not owned by this release” | Hand-applied object; --take-ownership to adopt |
| Roll back to the previous revision quickly | helm rollback <release> (revision omitted or 0) |
Old revision missing from helm history | --history-max default 10 pruned it |
Release stuck in pending-upgrade | Interrupted upgrade; roll back or delete that revision’s Secret |
| Job from a hook still present after uninstall | Hook resources are untracked; add hook-delete-policy or TTL |
| Hooks must run in a specific order | helm.sh/hook-weight (string, ascending) |
| Keep a PVC or Secret through uninstall | helm.sh/resource-policy: keep (becomes orphaned) |
Release not visible in helm list | Wrong namespace; use -n or -A |
| Uninstalled release cannot be rolled back | Needed --keep-history |
| CRD change in chart did not apply | crds/ is install-only; apply CRDs manually |
UPGRADE FAILED: removed kubernetes api(s) | Stored manifest uses a removed API; mapkubeapis; never roll back behind the fix |
lookup returns nothing in helm template | Client-side render fakes cluster lookups; use --dry-run=server |
| Which values does this chart accept? | helm show values <chart> |
| Which values did I set? | helm get values <release> (-a for computed) |
| Push a chart to a registry | helm package then helm push x.tgz oci://host/repo (no chart name in the ref) |
| Same subchart twice | alias in dependencies |
| Disable an optional subchart | condition: sub.enabled in parent values, or tags: |
Common Mistakes
- Running
helm upgrade --set one.thingand expecting last week’s--setvalues to persist. They do not unless you pass--reuse-valuesor a values file. - Confusing
versionwithappVersion.--versionon install selects the chart version, never the application version. - Omitting
-n. Release Secrets live in the release namespace;helm listwithout a namespace flag shows only the current context’s namespace. - Expecting
helm uninstallto remove hook resources or CRDs. It removes neither; hooks need a delete policy, CRDs are never deleted. - Using
templateinstead ofincludein a pipeline.templatecannot be piped tonindent;includecan. - Assuming
--waitguarantees readiness. On Helm 3 a single-replica Deployment with the defaultmaxUnavailablepasses immediately; on Helm 4 use thewatcherstrategy. - Reaching for
--forceto fix a patch conflict. It deletes and recreates the object; on Helm 4, server-side conflicts want--force-conflicts, and existing unowned objects want--take-ownership. - Rolling back past a removed-API fix. The older revision’s manifest reintroduces the dead API and the release becomes unmanageable again.
- Typing a Helm 4 flag on a Helm 3 binary (or vice versa).
helm versionfirst;--atomicand--forcestill work on Helm 4 with a warning, but--rollback-on-failureand--wait=watcherdo not exist on Helm 3.
How to Practise
Helm tasks on the CKAD are short but unforgiving: the chart version, the namespace, the values file and one upgrade flag are usually the whole question, and every wrong turn costs minutes you need elsewhere. Run the lab above once on a kind cluster with both Helm binaries if you can. Then rehearse under time: the Certified Kubernetes Application Developer (CKAD) Mock Exam Bundle includes timed performance-based Helm and Kustomize tasks in a real cluster, with solutions that show the exact commands and explain which values precedence rule, revision behaviour or hook policy the task was testing. Pair it with our kubectl cheat sheet, the Deployment rollout internals post for what happens under a Helm upgrade, the blue/green and canary strategies guide, and how to practise CKAD for free if you are building your own lab.
Frequently Asked Questions
Which Helm version does the CKAD exam use?
The Linux Foundation publishes the Kubernetes version of the CKAD environment (v1.37, aligned 4 to 8 weeks after each minor release) but not the Helm version. Helm 4 has been current since November 2025 and its version-skew policy pairs Helm 4.2.x and later with Kubernetes 1.37, so expect Helm 4 but run helm version first; charts and the core commands are identical, and only a few flags were renamed.
Where does Helm store a release?
In the release’s namespace, one Secret per revision named sh.helm.release.v1.<release>.v<revision> with type helm.sh/release.v1 and labels owner=helm, name, status and version. The release data key holds the gzipped, Base64-encoded release record (chart, values, manifest, hooks). HELM_DRIVER can switch the backend to ConfigMaps or SQL.
Why did helm upgrade drop the values I set earlier?
Because an upgrade that receives any new -f or --set values starts from the chart defaults and does not carry forward the previous revision’s user-supplied values. Use --reuse-values to merge on top of the old values, --reset-then-reuse-values to also pick up new chart defaults, or simply pass the same values file every time.
What is the exact values precedence in Helm?
Chart values.yaml, overridden by a parent chart’s values.yaml, overridden by -f files (right-most file wins), overridden by --set family flags (right-most wins). --set key=null deletes a key. Subcharts see only their own namespaced subtree plus global.
What does helm rollback with no revision do?
It rolls back to the previous revision (the same as passing 0) and records the rollback as a new revision. Every install, upgrade and rollback increments the revision number, and --history-max (default 10) prunes the oldest records when a new one is created.
Why did a rollback restore a replica count I changed with kubectl?
Because Helm 3 and 4 compute patches with a three-way strategic merge between the old manifest, the live state and the new manifest. The live state (0 replicas) differs from the old manifest (3), so the rollback patches it back even though the chart manifest did not change.
What is the difference between —atomic and —rollback-on-failure?
They are the same behaviour under two names. Helm 3 calls it --atomic (delete the installation on a failed install, roll back on a failed upgrade, and set --wait automatically). Helm 4 renamed it --rollback-on-failure, defaults --wait to the watcher strategy, and keeps --atomic as a deprecated alias.
Why is a Job created by a Helm hook still there after helm uninstall?
Hook resources are not tracked as part of the release, so uninstall does not remove them. Set helm.sh/hook-delete-policy (before-hook-creation is the default, plus hook-succeeded and hook-failed) or use the Job’s ttlSecondsAfterFinished.
Does Helm upgrade CRDs in the crds/ directory?
No. CRDs in crds/ are installed only on helm install (or upgrade --install of a new release), are never reinstalled if present, are never updated on upgrade or rollback, and are never deleted on uninstall. Apply CRD changes manually.
How do I push a chart to an OCI registry?
Package it with helm package, log in with helm registry login <hostname> (hostname only on Helm 4), then helm push mychart-0.1.0.tgz oci://registry/repo, with no chart name or tag in the reference. Install it with helm install name oci://registry/repo/mychart --version 0.1.0, where the chart name is part of the reference.
What does “UPGRADE FAILED: current release manifest contains removed kubernetes api(s)” mean?
The stored manifest of the deployed revision uses an API version the cluster no longer serves, so Helm cannot decode it to build the three-way patch. Fix the stored manifest with the mapkubeapis plugin, upgrade to a chart with supported APIs, and never roll back to a revision older than the fix. The best practice is to upgrade releases before upgrading the cluster.
Conclusion
Helm is a renderer plus a revision store plus a patch engine, and once you see those three parts every CKAD Helm symptom has a mechanical cause. The chart’s Chart.yaml separates the chart version from the application version and controls subcharts with conditions, tags and aliases; templates render Go text templates with include, required, tpl and lookup against .Release, .Values, .Chart and .Capabilities; values merge from the chart defaults through parent values and -f files to --set, and an upgrade forgets old --set values unless you say otherwise. Each revision lives in a sh.helm.release.v1 Secret in the release namespace, capped at ten by default; upgrades and rollbacks are three-way merges in Helm 3 and server-side applies latched per release in Helm 4; upgrade --install with --atomic (or --rollback-on-failure), --wait and a realistic --timeout is the safe deployment command; hooks run by weight, block on Jobs and outlive the release unless you give them a delete policy; CRDs are install-only; and OCI references omit the chart name on push and include it on pull. Learn these as rules, run the lab once, and the Helm task on exam day is a two-minute task instead of a ten-minute one.