Helm Hour 1: Core Fundamentals
lab). See the K8s course, Lesson 6 Module 1.That section already walked through packaging shop api as a chart and running install, upgrade and auto-rollback in 15 minutes; this lesson does not repeat that introduction, but breaks down each step: what Helm actually compares, writes and waits for, and how to troubleshoot when something goes wrong.- Explain Helm’s positioning: a Kubernetes package manager + release recorder; explain the pure-client architecture since Helm 3 (no Tiller; permissions come from the kubeconfig user’s RBAC), make justified choices among Helm, Kustomize and Operator, and list the key changes in Helm 4 compared with Helm 3.
- Precisely distinguish chart / release / revision / repository: chart package structure,
version(SemVer 2, the chart’s own version) andappVersion(app version) roles, release name and namespace scope, and the differences between traditional HTTP repositoriesindex.yamland OCI repositories. - Be able to fully recite
helm upgrade --installthe internal steps: load the chart → merge values → render templates → compare with the previous revision → using Server-Side Apply API calls → kstatus wait for readiness → write the release Secretsh.helm.release.v1.<name>.v<N>; know--rollback-on-failure,--waitthe three strategies for--server-sideand theautosemantics. - Master all the entry points and merge rules for values (deep merge for maps, whole-list replacement for lists,
nullkey deletion), and be able to state precisely--reuse-values,--reset-values,--reset-then-reuse-valuesand the differences among the four upgrade behaviours, including “adding nothing”. - Be proficient with
history / rollback / uninstall --keep-history, and read the release state machine (pending-*,deployed,superseded,failed,uninstalled). - Use
helm registry login / push / pull oci://to distribute charts, and digest to pin versions; usehelm template,helm get, helm-diff to review manifests before and after release. - Deploy Redis from a community chart, and use
helm createto generate a chart to deploy myapp, and be able to locate the 5 most common Helm errors.
1-hour time allocation table
| # | Time | Module | Core content | Animation / interaction | Lab (kind cluster lab) |
|---|---|---|---|---|---|
| 0 | Before class | Environment setup | Install Helm 4 (get-helm-4 / package manager), kind cluster lab, build the myapp image, add the podinfo repository and install a chart | Environment self-check checklist | helm version,helm list -A |
| 1 | 00–06 | What Is Helm: Architecture and Principles | Package manager analogy, pure-client architecture, release storage, Helm vs Kustomize vs Operator, overview of changes from Helm 3 to 4 | Tiller (Helm 2) vs pure-client data flow comparison | Inspect the release Secret directly with kubectl |
| 2 | 06–13 | Chart, Release and Repository | chart directory structure, Chart.yaml fields, version vs appVersion, release naming and namespaces, Artifact Hub, index.yaml vs OCI | chart file browser + SemVer constraint tester | Dissect the podinfo chart and repository index |
| 3 | 13–21 | Install and Upgrade | install / upgrade --install,--create-namespace,--wait (kstatus),--rollback-on-failure,--server-side,--dry-run=server | Core animation: the full mechanics of upgrade --install (including the failure-rollback branch) | Upgrade podinfo, trigger a failure and roll back automatically |
| 4 | 21–28 | Values: Overrides, Precedence and Inspection | values.yaml, multiple -f,--set flag family, merge rules,get values --all, the four upgrade values behaviours | values merge simulator | multi-environment values + reuse/reset comparison |
| 5 | 28–35 | Rollback, History and Uninstall | history,rollback,uninstall --keep-history, state machine,--history-max | release state machine simulator | roll back to a specified revision, uninstall while keeping history |
| 6 | 35–42 | OCI Repositories and Chart Distribution | helm package,registry login,push,pull oci://, digest pinning, OCI artifact structure | tag drift vs digest pinning | push to a local registry:3 and install by digest |
| 7 | 42–50 | helm template, get and diff | template (--validate deprecated → --dry-run=server),get manifest/values/notes/hooks/metadata/all, helm-diff and Helm 4 plugin validation | change values → live render diff | diff before upgrade, get after upgrade |
| 8 | 50–60 | Deploy myapp and Troubleshooting Basics | Reshape the helm create skeleton, connect Redis, 5 common errors | failure reproduction simulator + interactive troubleshooting tree | Bring myapp + Redis online |
| — | After class | Cheat sheet · Capstone lab | Redis (community chart) + myapp (self-built chart): full flow of upgrade, override, rollback and uninstall | Final quiz (12 questions) | Capstone lab |
Knowledge Coverage Matrix
| Target skill | M1 | M2 | M3 | M4 | M5 | M6 | M7 | M8 | Key commands | Lab |
|---|---|---|---|---|---|---|---|---|---|---|
| Explain Helm architecture and release storage | ✓ | ✓ | ✓ | · | ✓ | · | · | · | kubectl get secret -l owner=helm | M1 decode release |
| Choose Helm / Kustomize / Operator | ✓ | · | · | · | · | · | · | · | — | M1 scenario question |
| Read chart structure and versions | · | ✓ | · | · | · | ✓ | · | ✓ | helm show chart,helm pull --untar | M2 dissect podinfo |
| Install and upgrade safely | · | · | ✓ | ✓ | · | · | ✓ | ✓ | upgrade --install --wait --rollback-on-failure | M3 rollback on failure |
| Manage multi-environment values | · | · | · | ✓ | · | · | ✓ | ✓ | -f,--set*,get values --all | M4 reuse/reset |
| Rollback, history and uninstall | · | · | ✓ | · | ✓ | · | · | ✓ | history,rollback,uninstall --keep-history | M5 lab |
| OCI distribution and digest pinning | · | ✓ | · | · | · | ✓ | · | ✓ | push,pull oci://…@sha256: | M6 local registry |
| Pre- and post-release review checklist | · | · | ✓ | · | · | · | ✓ | ✓ | template,get all,diff upgrade | M7 diff |
| Troubleshooting common Helm errors | · | · | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | status,history,--debug | M8 failure reproduction |
Topics not covered in this lesson (and where to learn them)
| Topic | Why not in this lesson | Where to learn |
|---|---|---|
Template language in depth: scope,range/with,include/tpl, named templates,lookup | This lesson only modifies helm create the generated templates; it does not teach how to write them | Lesson 2 |
Dependencies and subcharts, library charts,values.schema.json, chart testing (ct) and release (chart-releaser) | belongs to advanced chart development | Lessons 2–3 (seeCourse Index) |
hook order and weights,helm test, CRD lifecycle | requires mastering templates first | Lesson 6 |
| GitOps reconciliation of Helm with Argo CD / Flux (HelmRelease), Helmfile, helm-secrets | belongs to delivery automation | Lesson 5 |
| deep recovery from a stuck pending-upgrade, migrating release storage drivers | This lesson only covers basic troubleshooting | Lesson 7 |
| Kubernetes objects themselves (Deployment, Service, probes) | Prerequisites | Kubernetes 8 + 1 Hour Crash Course |
How to use this course
Principles · Diagrams · Animation · Commands · Lab · Production cases · Troubleshooting · Quiz · Audio · Video. We suggest reading “Principles” and “Animation” first, then doing the “Lab”; the animation in Module 3 is the core of the whole course, so walk through both the success path and the failure path at least once.
A quiz score of 70% or more, or clicking “Mark this module complete”, counts toward progress. Progress is saved in this browser’s localStorage (in private mode or when storage is disabled, it is cleared on refresh).
The “Audio” page uses the browser’s built-in Web Speech API (en-US) to read the narration script aloud, with English terms pronounced in en-US; if no Chinese voice pack is installed, the script can still be read or passed to a TTS tool.
--rollback-on-failure Equivalent to Helm 3’s --atomic,--force-replace equivalent to --force,--wait In Helm 3 it is a boolean, does not use kstatus, and Helm 3 defaults to client-side three-way merge (not SSA). The cluster uses the default node image of kind v0.33.0 kindest/node:v1.37.0.Module 0 · Environment setup (Helm 4 + kind cluster)
- Lab machine: Ubuntu 24.04 (local machine, WSL2 or Azure VM), with Docker Engine installed (from the Docker course),
kubectl1.37,kindv0.33.0 (from K8s course Lesson 1). Windows and macOS users can also install Helm directly on the host, as long as itkubectlcan reach the kind cluster. - Connection to the previous course: reuse the kind cluster from the K8s course
lab(1 control-plane + 2 workers) and the Docker course’s myapp (Flask + gunicorn + Redis counter). This lesson adds namespaces:demo(warm-up and module labs),myapp(myapp + Redis). - Cost: everything runs on a local kind cluster, with no cloud charges. Module 6 uses a local
registry:3container as an OCI repository, so no cloud account is needed.
Step 1: Install Helm 4
The official install page lists two kinds of methods: project-maintained binaries / install scripts, as well as community-maintained package managers (Homebrew, Chocolatey, Scoop, winget, apt, dnf, snap, etc. — the official page clearly states that these packages are not supported by the Helm project and their versions may lag behind). The Helm 4 install script is named get-helm-4 (Helm 3’s is get-helm-3), which fetches from get.helm.sh and downloads the latest v4 release and verifies its SHA-256.
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-4 chmod 700 get_helm.sh less get_helm.sh # Read it first before running: any “curl | bash” style install should be reviewed first ./get_helm.sh helm version
Downloading https://get.helm.sh/helm-v4.3.2-linux-amd64.tar.gz
Verifying checksum... Done.
Preparing to install helm into /usr/local/bin
helm installed into /usr/local/bin/helm
version.BuildInfo{Version:"v4.3.2", GitCommit:"…", GitTreeState:"clean", GoVersion:"go1.2x.x", KubeClientVersion:"v1.3x"}
VER=v4.3.2
curl -fsSLO https://get.helm.sh/helm-${VER}-linux-amd64.tar.gz
curl -fsSLO https://get.helm.sh/helm-${VER}-linux-amd64.tar.gz.sha256sum
sha256sum -c helm-${VER}-linux-amd64.tar.gz.sha256sum
tar -xzf helm-${VER}-linux-amd64.tar.gz
sudo install -m 0755 linux-amd64/helm /usr/local/bin/helm# macOS brew install helm # Windows (pick one) winget install Helm.Helm choco install kubernetes-helm scoop install helm # Linux sudo snap install helm --classic sudo dnf install helm # Fedora
helm version --short, you must see v4.x.x. When both Helm 3 and 4 are present on one machine (for example during migration), you can rename v3 to helm3 , and put it on PATH to avoid script misuse. The apt source setup is lengthy (including GPG fingerprint verification), so copy directly from the official install page .helm version --short helm env | grep -E 'HELM_(CACHE|CONFIG|DATA)_HOME|HELM_DRIVER|HELM_NAMESPACE|HELM_KUBECONTEXT' # Optional: command completion source <(helm completion bash) && echo 'source <(helm completion bash)' >> ~/.bashrc
v4.3.2+g… HELM_CACHE_HOME="/home/azureuser/.cache/helm" HELM_CONFIG_HOME="/home/azureuser/.config/helm" HELM_DATA_HOME="/home/azureuser/.local/share/helm" HELM_DRIVER="" HELM_KUBECONTEXT="" HELM_NAMESPACE="default"
HELM_CONFIG_HOME stores repositories.yaml (repository list) and registry/config.json (OCI login credentials); HELM_CACHE_HOME caches the repository index and downloaded charts; HELM_DATA_HOME stores plugins. HELM_DRIVER An empty value means the default secret storage driver (detailed in Module 1).
Step 2: Prepare the kind cluster lab
If the K8s course’s lab cluster is still running, just run the first block to confirm; if it has been deleted, use the second block to rebuild it in 2–3 minutes (the node image is pinned by digest, consistent with the K8s course).
kind get clusters kubectl config use-context kind-lab kubectl get nodes
mkdir -p ~/helmlab && cd ~/helmlab cat > kind-lab.yaml <<'EOF' kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 name: lab nodes: - role: control-plane image: kindest/node:v1.37.0@sha256:a1ed56cfb0e7b93589bdf97c8cd566405a265939e3620fc4f5de89adff580ae5 - role: worker image: kindest/node:v1.37.0@sha256:a1ed56cfb0e7b93589bdf97c8cd566405a265939e3620fc4f5de89adff580ae5 - role: worker image: kindest/node:v1.37.0@sha256:a1ed56cfb0e7b93589bdf97c8cd566405a265939e3620fc4f5de89adff580ae5 EOF kind create cluster --config kind-lab.yaml kubectl get nodes
NAME STATUS ROLES AGE VERSION lab-control-plane Ready control-plane 60s v1.37.0 lab-worker Ready <none> 40s v1.37.0 lab-worker2 Ready <none> 40s v1.37.0
Step 3: Build the myapp image (Helm course version, adds /healthz and password support)
Same as the myapp from Lesson 1 of the Docker course (Flask + gunicorn, listening on 5000), this lesson adds two changes: /healthz a health-check endpoint (for probes) and REDIS_PASSWORD environment-variable support (the community Redis chart enables authentication by default). Build two tags, 1.0 and 1.1, to practise upgrades and rollbacks; kind nodes cannot see the host’s local images, so you need to kind load load them into kind.
mkdir -p ~/helmlab/myapp-src && cd ~/helmlab/myapp-src
cat > app.py <<'EOF'
import os, socket
from flask import Flask
import redis
VERSION = os.getenv("APP_VERSION", "1.0")
app = Flask(__name__)
r = redis.Redis(host=os.getenv("REDIS_HOST", "redis"), port=6379,
password=os.getenv("REDIS_PASSWORD") or None, socket_connect_timeout=1)
@app.route("/")
def index():
try:
hits = r.incr("hits")
except redis.exceptions.RedisError as e:
hits = f"N/A ({type(e).__name__})"
return f"myapp v{VERSION} from {socket.gethostname()}, hits={hits}\n"
@app.route("/healthz")
def healthz():
return "ok\n"
EOF
cat > requirements.txt <<'EOF'
flask==3.1.*
redis==5.*
gunicorn==23.*
EOF
cat > Dockerfile <<'EOF'
# syntax=docker/dockerfile:1
FROM python:3.13-slim
ARG APP_VERSION=1.0
ENV APP_VERSION=${APP_VERSION}
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app.py .
RUN useradd -m -u 10001 appuser
USER 10001
EXPOSE 5000
CMD ["gunicorn", "-b", "0.0.0.0:5000", "--workers", "2", "--access-logfile", "-", "app:app"]
EOF
docker build -t myapp:1.0 --build-arg APP_VERSION=1.0 .
docker build -t myapp:1.1 --build-arg APP_VERSION=1.1 .
kind load docker-image myapp:1.0 myapp:1.1 --name lab
Image: "myapp:1.0" with ID "sha256:…" not yet present on node "lab-worker", loading... Image: "myapp:1.1" with ID "sha256:…" not yet present on node "lab-worker2", loading...
Step 4: Warm-up — add a public repository and install a chart
Use the podinfo chart that appeared in the K8s course shop app: its author maintains a traditional HTTP chart repository on GitHub Pages (also published to OCI; see Module 6). The latest version verified on Artifact Hub in 2026-11 is chart 6.17.0 / appVersion 6.17.0.
helm repo add podinfo https://stefanprodan.github.io/podinfo helm repo update helm search repo podinfo helm search repo podinfo/podinfo --versions | head -5 helm install hello podinfo/podinfo --version 6.17.0 -n demo --create-namespace --wait helm list -n demo
"podinfo" has been added to your repositories Hang tight while we grab the latest from your chart repositories... ...Successfully got an update from the "podinfo" chart repository Update Complete. ⎈Happy Helming!⎈ NAME CHART VERSION APP VERSION DESCRIPTION podinfo/podinfo 6.17.0 6.17.0 Podinfo Helm chart for Kubernetes ... NAME: hello LAST DEPLOYED: Sun Nov 15 10:02:11 2026 NAMESPACE: demo STATUS: deployed REVISION: 1 NOTES: 1. Get the application URL by running these commands: echo "Visit http://127.0.0.1:8080 to use your application" kubectl -n demo port-forward deploy/hello-podinfo 8080:9898 NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION hello demo 1 2026-11-15 10:02:11.48 +0000 UTC deployed podinfo-6.17.0 6.17.0
kubectl -n demo get deploy,svc,secret kubectl -n demo port-forward deploy/hello-podinfo 8080:9898 & sleep 2; curl -s localhost:8080 | head -5; kill %1
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/hello-podinfo 1/1 1 1 40s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/hello-podinfo ClusterIP 10.96.81.17 <none> 9898/TCP,9999/TCP 40s
NAME TYPE DATA AGE
secret/sh.helm.release.v1.hello.v1 helm.sh/release.v1 1 40s
{
"hostname": "hello-podinfo-6d8c9f7b5-x2kqp",
"version": "6.17.0",
...
sh.helm.release.v1.hello.v1 is the “release record” Helm wrote. Helm has no server and no database of its own; all state lives there. Module 1 will decode it for you.helm repo add bitnami https://charts.bitnami.com/bitnami. Since 2025-08-28, Broadcom has reorganised the Bitnami catalogue: free images with version tags have been moved to a docker.io/bitnamilegacy, while the free tier keeps only a few latest tagged images (for development use); chart source code stays open under Apache 2.0. So this lesson’s Redis switches to a chart marked “Verified Publisher” on Artifact Hub, an CloudPirates open-source chart (OCI: oci://registry-1.docker.io/cloudpirates/redis, using official redis images). Before choosing any community chart for production, review the image source, maintenance frequency and license.Warm-up: answer from memory (30 seconds)
What is the biggest difference between kubectl apply on a set of YAML and helm install on a chart?
kubectl only “sends these objects to the cluster”; it does not remember that this set is one release, and does not know what the previous version was. Helm treats the whole set as one versioned release release, recording the chart and values used for each release, so it can list history, roll back, and uninstall the whole set.
Does Helm need any component installed in the cluster?
No. Since Helm 3, Helm is a pure client tool that only talks to the API server using your kubeconfig; Helm 2’s server-side component Tiller has been fully removed.
Module 1 · What Is Helm: Architecture and Principles
- Use the “package manager” analogy to explain the four concepts of chart, repository, release and revision, and point out where the analogy breaks down (Helm also manages “running instances”).
- Draw the pure-client architecture of Helm 3/4: rendering is local, permissions come from the kubeconfig user’s RBAC, and release records are stored as Secrets in the release’s namespace.
- Choose between Helm, Kustomize and Operator by scenario; list 6 or more key changes from Helm 3 to 4 and their migration impact.
What: Helm is the package manager for Kubernetes
Helm is a CNCF graduated project. It bundles “a set of Kubernetes manifests + configurable parameters + metadata needed to deploy an application” into one package (chart), distributed through repositories; after installation it forms a named instance with a version history in the cluster (release).
| Package manager concept | apt / Homebrew | Helm | Where the analogy breaks down |
|---|---|---|---|
| Package | .deb / formula | chart (a directory or .tgz) | In a chart, these are templates, rendered into concrete manifests only at install time |
| Repository | apt source / tap | repository: HTTP repository (index.yaml) or OCI repository | OCI repositories have no index, so they cannot helm search repo |
| be used to install a release by name | There is only one copy in the system | release: the same chart can be installed several times in one cluster (different names/namespaces) | apt does not allow the same package to be installed twice |
| Version history | usually not kept | revision: each install/upgrade/rollback adds 1 and can be rolled back | rollback does not “restore old data”; it only restores the manifests |
| Configuration | /etc config files under | values: injected into templates at install time | same chart + different values = different environments |
Why: what kubectl apply still lacks
- Parameterization: dev/staging/prod differ only in replica count, image tag and domain name — without a template you can only copy three sets of YAML.
- “One release” boundary: kubectl does not know these 12 objects belong to the same application; after you delete a ConfigMap from the chart,
kubectl applyit will not delete the old object in the cluster (unless you use the experimental--prune), and Helm compares with the previous revision and deletes it. - History and rollback:
helm historysee who released which chart version and when,helm rollbackand one command rolls back to the previous version. - Distribution ecosystem: tens of thousands of third-party charts (ingress-nginx, cert-manager, Prometheus……) can be found through Artifact Hub search.
How: pure-client architecture (since Helm 3, continued in Helm 4)
- The client is everything:
helma Go binary with client-go and the Go template engine built in. It reads kubeconfig (--kube-context,--kubeconfig,-n), obtaining the cluster address and identity. - Local rendering: charts are loaded from a local directory, the repository cache or an OCI repository; values merging and template rendering all happen on your machine. The cluster is only read when you use
lookupfunctions or--dry-run=serverthe cluster needs to be read. - Call the API with your own identity: creating or updating objects uses the kubeconfig user’s permissions — RBAC does not allow you to create a ClusterRole, so a ClusterRole in the chart will fail. In the Helm 2 era, the in-cluster Tiller (usually with cluster-admin) acted on its behalf, a well-known security risk that Helm 3 removed.
- Release storage: each revision is stored as a Secret: name
sh.helm.release.v1.<release>.v<revision>, typehelm.sh/release.v1, labelsname,owner=helm,status,version(including timestampcreatedAt/modifiedAt).data.releaseholds a JSON of the release object (chart, user values, rendered manifest, hooks, status, NOTES), gzip-compressed and then base64-encoded (a Kubernetes Secret base64-encodes it once more). - Storage driver: the environment variable
HELM_DRIVERselects:secret(default),configmap,memory(for testing; lost when the process exits),sql(PostgreSQL, suited to very large releases).
Too long: must have at most 1048576 bytes). Remedies: use .helmignore to exclude unrelated files, avoid putting large data files in the chart, split the chart, or switch to sql driver (Lesson 7).When: when to use Helm and when not to
| Helm | Kustomize | Operator | Pure kubectl apply | |
|---|---|---|---|---|
| Core idea | template + values → render; release records state | No templates: base + overlay patches (kubectl built-in -k) | Custom controllers continuously reconcile CRDs | Declaratively submit raw manifests |
| Parameterization approach | Go template, flexible but hard to read | patch / replacements, pure YAML | the spec field of a CR | none |
| Versioning and rollback | Built-in revisions / rollback | None (relies on Git) | Implemented by the Operator itself | None |
| Third-party distribution | De facto standard (chart repositories, OCI) | Weak (remote bases) | OperatorHub / commonly installed with Helm itself | None |
| Day-2 operations at runtime | Not responsible (install and forget) | Not responsible | Strong at: backup, failover, upgrade orchestration | Not responsible |
| Typical scenarios | Packaging and distributing apps, multi-environment parameters, installing third-party software | Environment differences in in-house manifests; also often used as a Helm post-renderer | Complex stateful systems such as databases and message queues | One-off objects, learning |
They are not mutually exclusive: common combinations are “Helm installs an Operator, which manages database instances”, or “Argo CD renders a Helm chart and then layers Kustomize patches on top”.
Helm 3 → Helm 4: overview of key changes (released 2025-11, verified)
| Aspect | Helm 3 | Helm 4 | Impact on you |
|---|---|---|---|
| Automatic rollback on failure | --atomic | --rollback-on-failure (the old name still works and prints a deprecation warning) | Update CI scripts |
| Force replace | --force | --force-replace (old name deprecated) | Same as above |
| How objects are applied | Client-side three-way merge patch | New installs default to Server-Side Apply; the upgrade/rollback --server-side default auto (keeps the method used by the previous revision) | Releases migrated from Helm 3 still default to the client-side method; explicitly --server-side=true to switch |
| Waiting for readiness | --wait Boolean, polling | --wait Takes watcher (kstatus, event-driven) / hookOnly (default when omitted) / legacy; a single --wait is equivalent to watcher | --wait=true/false ; the old form is still accepted but warns |
| post-renderer | Executable path | must be provided as a plugin, pass the plugin name as the argument | Migrate Kustomize post-renderer scripts |
| Plugin system | Subprocess plugins | New, optional WebAssembly runtime; plugin types CLI / getter / post-renderer; helm plugin install source signatures are verified by default (--verify=true) | Installing plugins from a Git URL requires --verify=false (Module 7) |
| OCI | Install by tag | Supported Install by digest (mismatches are rejected); registry login only accepts a hostname | Supply chain is more controllable (Module 6) |
| Chart API | v2 | v2 unchanged; v3 experimental (HELM_EXPERIMENTAL_CHART_V3) | not yet for production use |
| Other | — | content-based chart caching, faster dependency resolution,slog structured logging, stable SDK API,helm template --validate deprecated (use --dry-run=server) | — |
kubectl edit changes an object, Helm will not correct it automatically; continuous reconciliation requires Argo CD / Flux (Lesson 5). ③ “helm rollback restores database data”——it only re-applies the old manifests; data in the PVC does not go back in time. ④ “releases are global”——a release name is only unique within its namespace,helm list and by default only the current namespace is looked at.Architecture diagram: Helm 4 components and data flow
Comparison diagram: Helm 2 (Tiller) vs Helm 3/4 (pure client)
Step-by-step animation: the path a helm command takes through the pure-client architecture
Click “Next” to step through. Switch to “Helm 2 mode” to compare the path of the same command in the Tiller era — note whose permissions are checked.
Core commands and flags
| Command | Purpose | Key flags / notes |
|---|---|---|
helm version | Client version (no server version to query) | --short,--template '{{.Version}}' |
helm env | Shows the directories and environment variables Helm uses | HELM_DRIVER,HELM_NAMESPACE,HELM_KUBECONTEXT |
helm list | Lists releases (reads release Secrets) | -A all namespaces; -a includes failed/pending/uninstalled; --pending,--failed,--uninstalled (requires --keep-history),-o json |
helm status | status and NOTES of the release’s current revision | --revision N,--show-resources,-o yaml |
| Global flags | Common to all subcommands | -n/--namespace,--kube-context,--kubeconfig,--kube-as-user/--kube-as-group (impersonate identity),--debug |
kubectl get secret -l owner=helm | Inspect release storage directly | Labels name,status,version can be used as selectors |
helm list -A kubectl get secret -A -l owner=helm --show-labels
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION hello demo 1 2026-11-15 10:02:11.48 +0000 UTC deployed podinfo-6.17.0 6.17.0 NAMESPACE NAME TYPE DATA AGE LABELS demo sh.helm.release.v1.hello.v1 helm.sh/release.v1 1 5m createdAt=1794736930,modifiedAt=1794736931,name=hello,owner=helm,status=deployed,version=1
Decode a release record
# Two rounds of base64: the outer layer is Kubernetes Secret encoding, the inner layer is Helm’s own encoding; then gunzip
kubectl -n demo get secret sh.helm.release.v1.hello.v1 -o jsonpath='{.data.release}' \
| base64 -d | base64 -d | gunzip | jq '{name, namespace, version, status: .info.status, chart: .chart.metadata.version, config, manifest_lines: (.manifest | split("\n") | length)}'
{
"name": "hello",
"namespace": "demo",
"version": 1,
"status": "deployed",
"chart": "6.17.0",
"config": {},
"manifest_lines": 118
}
How to verify:config is the values you supplied values (none were passed here, so it is an empty object), not the full merged values — this is exactly the source of the difference in Module 4 between helm get values and --all . Common errors: Decoding only once gives gibberish (still base64); without jq , you can drop the final step and read the JSON directly. Production use: The release Secret holds the full values (which may include passwords), so the get/list permission is equivalent to being able to read every chart’s configuration, so RBAC must be tightened.
Run helm with a restricted identity
# --kube-as-user runs as another identity via Kubernetes impersonation, provided the current user has impersonate permission (kind’s admin has it) helm list -A --kube-as-user system:serviceaccount:demo:viewer
Error: list: failed to list: secrets is forbidden: User "system:serviceaccount:demo:viewer" cannot list resource "secrets" in API group "" at the cluster scope
Lab 1: See for yourself a “package manager without a server” (about 5 minutes)
kubectl get pods -A | grep -iE 'tiller|helm' || echo "No Helm-related Pod" kubectl get secret -A -l owner=helm
No Helm-related Pod NAMESPACE NAME TYPE DATA AGE demo sh.helm.release.v1.hello.v1 helm.sh/release.v1 1 8m
kubectl -n demo get deploy hello-podinfo -o jsonpath='{.metadata.labels.app\.kubernetes\.io/managed-by}{"\n"}{.metadata.annotations}{"\n"}'
kubectl -n demo get deploy hello-podinfo -o jsonpath='{range .metadata.managedFields[*]}{.manager}{" "}{.operation}{"\n"}{end}'
Helm
{"deployment.kubernetes.io/revision":"1","meta.helm.sh/release-name":"hello","meta.helm.sh/release-namespace":"demo"}
helm Apply
kube-controller-manager Update
helm Apply This shows the object was written using Server-Side Apply (the default for new installs in Helm 4), with the field manager set to helm. Objects installed with Helm 3 usually show helm Update.
kubectl -n demo create serviceaccount viewer kubectl -n demo create rolebinding viewer-view --clusterrole=view --serviceaccount=demo:viewer helm list -n demo --kube-as-user system:serviceaccount:demo:viewer
Error: list: failed to list: secrets is forbidden: User "system:serviceaccount:demo:viewer" cannot list resource "secrets" in API group "" in the namespace "demo"
The built-in view ClusterRole deliberately does not include Secrets, but releases are stored in Secrets, so a read-only user cannot even helm list do that. This is by design: the release contains the full values.
HELM_DRIVER=configmap helm install hello-cm podinfo/podinfo --version 6.17.0 -n demo kubectl -n demo get configmap -l owner=helm HELM_DRIVER=configmap helm list -n demo # shows hello-cm helm list -n demo # default secret driver: hello-cm not visible! HELM_DRIVER=configmap helm uninstall hello-cm -n demo
NAME DATA AGE sh.helm.release.v1.hello-cm.v1 1 3s ... NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION hello demo 1 … deployed podinfo-6.17.0 6.17.0
Mixing drivers in the same cluster makes releases “disappear”. The team must standardise HELM_DRIVER (usually keep the default).
kubectl -n demo delete rolebinding viewer-view; kubectl -n demo delete sa viewer
Case 1: from the Tiller-era “master key” to per-team authorization
Problem: Years ago a company used Helm 2, with all teams releasing through a single cluster-admin Tiller; security audits could not answer “who changed the payment service”. Approach: After migrating to Helm 3/4, each team’s CI uses a ServiceAccount in its own namespace (the Role only grants Deployment/Service/ConfigMap/Secret etc. in that namespace), and the API server audit log directly records the real identity. Limitation: If a chart contains cluster-level objects such as ClusterRole, CRD or Webhook, the platform team must install it separately with higher privileges, or split it into a “platform chart” and an “application chart”.
Case 2: release Secret leaks database password
Problem: A developer installed via --set db.password=… , then granted an outside contractor read access to Secrets in the namespace for troubleshooting; the contractor decoded the release Secret and saw all the passwords. Approach: Passwords were moved to a pre-created Kubernetes Secret (referenced in the chart via existingSecret ), or use External Secrets / helm-secrets (Lesson 5); troubleshooting permissions use a view. Configuration: Audit the helm get values output to check whether sensitive keys appear. Limitation: Any value passed via values is recorded in the release record; it cannot be “used only in memory”.
Case 3: division of labour between Helm and Operators
Problem: The team wanted one Helm chart to manage PostgreSQL primary/replica switching and backups, and the hooks kept growing more complex. Approach: Changed to “Helm installs the CloudNativePG Operator (once), and the application chart declares a Cluster CR”, leaving failover and backups to the Operator for continuous reconciliation. Limitation: The Operator itself also needs upgrading and monitoring; CRD upgrades are not managed by Helm (Lesson 6).
Common errors and fixes
Error: Kubernetes cluster unreachable: Get "http://localhost:8080/version": dial tcp 127.0.0.1:8080: connect: connection refused
Cause: Helm could not find kubeconfig (KUBECONFIG is unset or the file does not exist), so client-go fell back to the default address localhost:8080. Common with sudo, CI containers, and path mismatches between WSL and Windows.
echo $KUBECONFIG; kubectl config current-context helm list --kubeconfig ~/.kube/config --kube-context kind-lab
Fix: Export the correct KUBECONFIG, or explicitly pass --kubeconfig/--kube-context; do not run helm with sudo (there is no kubeconfig under root’s HOME).
Error: list: failed to list: secrets is forbidden: User "…" cannot list resource "secrets" in API group "" in the namespace "…"
Cause: Helm needs list/get permission on Secrets; the read-only view role does not include Secrets.
kubectl auth can-i list secrets -n demo --as system:serviceaccount:demo:ci
Fix: Grant the release identity the namespace’s edit/admin or a custom Role (including get/list/create/update/delete on secrets); for read-only troubleshooting use kubectl instead of helm.
helm list shows nothing, yet the app is clearly in the cluster
Cause:① not in the same namespace (helm list by default only the current namespace is listed); ② installed with a different HELM_DRIVER; ③ the app was actually deployed with kubectl/Kustomize; ④ the release is in failed/pending status, which the default list does not show.
helm list -A -a
kubectl get secret,configmap -A -l owner=helm
kubectl get deploy X -o jsonpath='{.metadata.annotations.meta\.helm\.sh/release-name}'Secret "sh.helm.release.v1.big.v3" is invalid: data: Too long: must have at most 1048576 bytes
Cause: The release record (compressed chart + manifest) exceeds Kubernetes’s 1 MiB limit for Secrets.
helm package ./big && ls -lh big-*.tgz helm template big ./big | wc -c
Fix: In .helmignore the file, exclude test data, docs and large JSON; move large files such as Grafana dashboards out of the chart (use a ConfigMap generator or sidecar pull instead); if needed, split the chart or use sql driver.
Flag --atomic has been deprecated, use --rollback-on-failure instead
Cause: Helm 4 renamed the flag; the old name still works but prints a warning. --force Likewise (changed to --force-replace).
Fix: Update the scripts; if a script must stay compatible with both Helm 3 and 4, you can select the flag based on the helm version --template '{{.Version}}' ’s major version.
1. Use one command to list all release record Secrets in the cluster, showing only those whose status is failed.
kubectl get secret -A -l owner=helm,status=failed
2. Decode revision 1 of hello in the demo namespace, outputting only its status and chart version.
kubectl -n demo get secret sh.helm.release.v1.hello.v1 -o jsonpath='{.data.release}' | base64 -d | base64 -d | gunzip | jq -r '.info.status + " " + .chart.metadata.version'The team needs to deploy an in-house set of 5 microservices (three environments: dev/staging/prod), and also install cert-manager and a PostgreSQL that needs automatic failover. For each of the three kinds of object, choose Helm, Kustomize or Operator and explain why.
cert-manager: use the official Helm chart (the de facto standard for third-party distribution; CRD handling is covered in Lesson 6). PostgreSQL: use an Operator (such as CloudNativePG), since failover and backup are “day-2 operations” and Helm can only do a one-off install; install the Operator itself with Helm. In-house microservices: either works. If the team needs to reuse the app as a “package” across several teams and needs revision rollback, use one generic Helm chart plus per-environment values; if the differences between the three environments are small and the team prefers pure YAML, use Kustomize base/overlay, with GitOps providing rollback. The key is to standardise on one approach and avoid having the same object managed by two tools.
Verified teaching videos
Official documentation
- Using Helm (three core concepts)
- Helm 4 Overview (Helm 4 changes)
- Helm Architecture
- Helm 4 Released (official blog)
Video storyboard script (about 90 seconds)
This courseware cannot generate video/MP3 directly; storyboards and narration scripts are provided and can be handed to a video tool.
Visual: terminals side by side, left “apt install nginx”, right “helm install web bitnami/nginx”; below, four labels appear: “package / repository / installed instance / version”.
Narration: Helm is the package manager for Kubernetes. A chart is the package, a repository handles distribution, and once installed in the cluster it is called a release; each change is a revision.
Visual: inside a laptop, the helm icon combines templates and values into YAML; an arrow passes through a lock labelled RBAC and enters the API server.
Narration: Helm has no server. Rendering happens on your computer, then the API is called with your own identity; any permission you lack, Helm lacks too.
Visual: in a namespace, a row of Secret cards v1, v2, v3 appears; one is flipped open, revealing chart, values and manifest.
Narration: on every release, Helm writes a Secret in the namespace containing the complete release record. History, rollback and uninstall all depend on it.
Visual: Helm 3 and Helm 4 columns side by side; --atomic is struck through and becomes --rollback-on-failure, with SSA, kstatus and Wasm icons beside it.
Narration: Helm 4 applies server-side by default, waits for readiness with kstatus, and plugins can run in WebAssembly. Old flags still work, but please migrate as soon as possible.
Module 2 · Chart, Release and Repository
- Identify the role of each file and directory in a chart, and know which are required (
Chart.yaml), which are conventions (values.yaml,templates/), which receive special treatment (crds/,NOTES.txt, and templates beginning with_). - Distinguish the chart
version(must be SemVer 2; determines which package is picked from the repository) andappVersion(a free-form string used only for display and as the default image tag), and--versioncan write version constraints (^,~, ranges). - Explain the rules and scope of release names (unique within a namespace, ≤ 53 characters, lowercase DNS style), and
-nhow the namespace also determines where the release record is stored and the default namespace of objects. - Compare traditional HTTP repositories (
index.yaml) with OCI repositories, and use Artifact Hub to evaluate a third-party chart.
What: the chart directory structure
myapp/ ├── Chart.yaml # required: metadata (apiVersion, name, version…) ├── Chart.lock # optional: generated by helm dependency update, pins the exact dependency versions ├── values.yaml # convention: default configuration values ├── values.schema.json # optional: validates values with JSON Schema (Lesson 3) ├── charts/ # dependency subcharts (.tgz or directories) ├── crds/ # optional: CRDs, created first at install, not rendered as templates, not handled on upgrade/uninstall ├── templates/ # templates: rendered into Kubernetes manifests │ ├── NOTES.txt # instructions printed to the user after install/upgrade (also a template) │ ├── _helpers.tpl # files starting with _ produce no manifest; they only hold named templates │ ├── deployment.yaml │ ├── service.yaml │ ├── serviceaccount.yaml │ ├── hpa.yaml │ ├── ingress.yaml │ ├── httproute.yaml # helm create in Helm 4 adds a Gateway API HTTPRoute example │ └── tests/ │ └── test-connection.yaml # Pod used by helm test (Lesson 6) ├── .helmignore # files excluded when packaging (syntax similar to .gitignore) ├── README.md / LICENSE # Artifact Hub displays the README
Chart.yaml key fields (apiVersion v2)
| Field | Required | Description |
|---|---|---|
apiVersion | Yes | v2 (Helm 3/4). v1 is the legacy format from Helm 2, with dependencies in requirements.yaml. The v3 Chart API in Helm 4 is still experimental. |
name | Yes | Chart name, usually the same as the directory name; lowercase letters, digits, hyphens |
version | Yes | The chart’s own version, must be SemVer 2 (e.g. 0.1.0,1.4.2-rc.1); the repository indexes by it, and the package file name is name-version.tgz |
appVersion | No | The version of the packaged app (any string; the official docs recommend quoting it); helm create in templates, image.tag is used by default when empty |
type | No | application (default) or library (provides only named templates and cannot be installed) |
kubeVersion | No | Compatible Kubernetes version constraint, e.g. ">=1.30.0-0", installation is refused if not satisfied |
dependencies | No | List of subcharts (name, version constraint, repository, condition, alias…); detailed in Lesson 3 |
description,home,sources,maintainers,icon,keywords,annotations,deprecated | No | Used for display and discovery; deprecated: true Artifact Hub will mark it as deprecated |
version vs appVersion: two versions, two things
version | appVersion | |
|---|---|---|
| What it describes | The chart package (templates + default values) | The application deployed by the chart |
| Format | Strict SemVer 2 | Any string |
| When it increments | Any file change in the chart, including changing only appVersion | The application releases a new version |
| Who uses it | --version Constraints, repository index, dependency resolution, OCI tags | helm list the APP VERSION column in helm list output, and the .Chart.AppVersion |
| Example | podinfo chart 6.17.0 | podinfo app 6.17.0 (the author deliberately keeps them in step; this is not a rule) |
Version constraints (Masterminds/semver syntax): 1.2.3 exact; ^1.2.3 = >=1.2.3 <2.0.0; ~1.2.3 = >=1.2.3 <1.3.0; 1.2.x; ">=1.2 <1.5". Prerelease versions (-rc.1) are excluded from matching by default, so you need to --devel or write the prerelease part explicitly in the constraint. Without --version the latest stable version is picked — in production, always pin the version.
Release: name, namespace and revision
- Naming rules: lowercase letters, digits,
-,.and must start and end with an alphanumeric character; maximum 53 characters (leaving room for suffixes on generated object names).--generate-nameCan be auto-generated (for examplepodinfo-1794736930). - Scope: the release name is unique within its namespace.
demo/helloandprod/helloare two unrelated releases. -nDual role of: ① the release Secret is written to this namespace; ② in the template, ifmetadata.namespaceis not set, objects are created here by default (Helm passes the namespace to the API call). If the chart hardcodesnamespace: kube-system, objects are created elsewhere, but the release record stays in-nthe namespace that was specified.- revision: each install, upgrade and rollback creates a new integer revision, starting at 1 and never reused.
- Built-in objects available in templates:
.Release.Name,.Release.Namespace,.Release.Revision,.Release.IsInstall,.Release.IsUpgrade,.Chart.Name,.Chart.Version,.Chart.AppVersion(detailed in Lesson 2).
Repository: two kinds of repositories
| Traditional HTTP repository | OCI repository | |
|---|---|---|
| Essence | Any static HTTP server: index.yaml + several .tgz (GitHub Pages, S3, Nginx…) | OCI artifacts in container image registries (ACR, ECR, GHCR, Docker Hub, Harbor…) |
| Client configuration | helm repo add NAME URL, written to repositories.yaml; helm repo update downloads the index to the cache | No repo add needed (not supported either); when needed, pull the chart directly helm registry login HOST |
| Reference format | NAME/chart --version X | oci://HOST/PATH/chart --version X or …/chart@sha256:… |
| Search | helm search repo (searches the locally cached index) | cannot helm search repo; use the repository’s own UI/API or Artifact Hub |
| Drawbacks | index.yaml grows with the number of versions (large repositories can reach tens of MB) and is fully downloaded on every update; it needs separate hosting | must work with the image registry’s authentication system; repositories differ in requirements such as “namespaces must be created in advance” |
| Trend | Many existing charts are still in use | GA since Helm 3.8; Helm 4 further enhances it (install by digest); many projects (such as cert-manager and CloudPirates) offer OCI first or alongside |
apiVersion: v1
entries:
podinfo:
- apiVersion: v2
appVersion: 6.17.0
created: "2026-…"
description: Podinfo Helm chart for Kubernetes
digest: 3a1f… # SHA-256 of the .tgz
name: podinfo
urls:
- https://stefanprodan.github.io/podinfo/podinfo-6.17.0.tgz
version: 6.17.0
- … (earlier versions)
generated: "2026-…"
Artifact Hub: how to evaluate a third-party chart
Artifact Hub(a CNCF project) is the search portal for charts; it does not host charts itself, only indexing each publisher’s repositories. helm search hub redis calls its API. When evaluating, look at: Verified Publisher (publisher has verified control of the repository),Official (official publisher of the software),Signed (has provenance signatures), last update time, security reports (image vulnerability scans), default values and README, and where the images come from.
helm search hub. ③ “Release names are unique across the cluster”——that was Helm 2 behaviour; since Helm 3 they are unique within a namespace. ④ “OCI repositories also need helm repo add”——they do not, and it is not supported.Relationship diagram: chart → release → revision, and where repositories sit
Flowchart: from repository to local cache
Interaction 1: chart file browser
Click a file on the left to see its role, whether it is required, and how Helm treats it.
Interaction 2: SemVer constraint tester
Enter a --version constraint and see which of the podinfo repository’s versions is selected (as Helm does: the highest version satisfying the constraint; prerelease versions are excluded by default).
Core commands and flags
| Command | Purpose | Key flags / notes |
|---|---|---|
helm repo add / list / update / remove | Manage HTTP repositories | --force-update overwrites same name; --username/--password (private repository); helm repo update podinfo updates only one |
helm search repo | Search the locally cached index | --versions lists all versions; --version '^6'; --devel; -o json |
helm search hub | Search on Artifact Hub | --list-repo-url shows repository URL; --max-col-width |
helm show chart|values|readme|crds|all | View chart contents without downloading to the current directory | supports repo/chart, OCI and local paths; --version |
helm pull | Download the chart package | --untar,--untardir,-d,--version,--prov/--verify |
helm create / lint / package | Create skeleton / static check / package as .tgz | package --version 0.2.0 --app-version 1.1 can override the version |
helm repo index | generates index.yaml for the .tgz files in a directory | --url download URL prefix; --merge merges an existing index |
helm show chart podinfo/podinfo --version 6.17.0 helm search repo podinfo/podinfo --versions --version '~6.16'
apiVersion: v1 appVersion: 6.17.0 description: Podinfo Helm chart for Kubernetes home: https://github.com/stefanprodan/podinfo kubeVersion: '>=1.23.0-0' maintainers: - email: stefanprodan@users.noreply.github.com name: stefanprodan name: podinfo sources: - https://github.com/stefanprodan/podinfo version: 6.17.0 NAME CHART VERSION APP VERSION DESCRIPTION podinfo/podinfo 6.16.x 6.16.x Podinfo Helm chart for Kubernetes
Note: The apiVersion and kubeVersion actually declared in podinfo’s Chart.yaml should be checked against the real output of helm show chart (the above is an example format); charts with apiVersion v1 can still be installed in Helm 3/4. How to verify:helm search repo Returns empty; first run helm repo update. Production use: Before upgrading a third-party chart, use helm show values to compare default values between the old and new versions (diff <(helm show values X --version A) <(helm show values X --version B)).
helm search hub redis --max-col-width 60 | head -5
URL CHART VERSION APP VERSION DESCRIPTION https://artifacthub.io/packages/helm/bitnami/redis 28.x.x 8.10.x Redis(R) is an open source, advanced key-value… https://artifacthub.io/packages/helm/cloudpirates-… 0.39.x 8.10.x An open source, in-memory data structure store… …
Lab 2: dissect the podinfo chart and build your own HTTP repository (about 6 minutes)
cd ~/helmlab helm pull podinfo/podinfo --version 6.17.0 --untar find podinfo -maxdepth 2 | sort grep -nE '^(apiVersion|name|version|appVersion|kubeVersion)' podinfo/Chart.yaml
podinfo podinfo/.helmignore podinfo/Chart.yaml podinfo/README.md podinfo/templates podinfo/templates/NOTES.txt podinfo/templates/_helpers.tpl podinfo/templates/deployment.yaml podinfo/templates/service.yaml … podinfo/values.yaml
grep -n 'image:' -A4 podinfo/values.yaml | head grep -n 'image' podinfo/templates/deployment.yaml | head -3
You will see that values contains image.repository and image.tag, and the template combines them into the image: field. Many charts (including the helm create skeleton) fall back to .Chart.AppVersion when the tag is empty — this is the only place where appVersion affects the deployment outcome.
mkdir -p ~/helmlab/repo && cd ~/helmlab helm create mychart helm lint mychart helm package mychart -d repo # mychart-0.1.0.tgz helm package mychart -d repo --version 0.2.0 --app-version 1.17.0 helm package mychart -d repo --version 0.3.0-rc.1 helm repo index repo --url http://127.0.0.1:8879 cat repo/index.yaml | grep -E '^\s+(version|appVersion|digest):'
==> Linting mychart
[INFO] Chart.yaml: icon is recommended
1 chart(s) linted, 0 chart(s) failed
Successfully packaged chart and saved it to: repo/mychart-0.1.0.tgz
…
appVersion: 1.16.0
digest: 5d0c…
version: 0.3.0-rc.1
appVersion: 1.17.0
digest: 9be1…
version: 0.2.0
appVersion: 1.16.0
digest: 77aa…
version: 0.1.0(cd repo && python3 -m http.server 8879 --bind 127.0.0.1 >/dev/null 2>&1 &) helm repo add local http://127.0.0.1:8879 helm search repo local/ --versions helm search repo local/ --versions --devel
NAME CHART VERSION APP VERSION DESCRIPTION local/mychart 0.2.0 1.17.0 A Helm chart for Kubernetes local/mychart 0.1.0 1.16.0 A Helm chart for Kubernetes NAME CHART VERSION APP VERSION DESCRIPTION local/mychart 0.3.0-rc.1 1.16.0 A Helm chart for Kubernetes local/mychart 0.2.0 1.17.0 A Helm chart for Kubernetes local/mychart 0.1.0 1.16.0 A Helm chart for Kubernetes
Prerelease versions 0.3.0-rc.1 They only show up when you add --devel . helm create The default appVersion is 1.16.0 (corresponding to the nginx image tag).
helm install web local/mychart --version 0.1.0 -n demo helm install web local/mychart --version 0.2.0 -n demo2 --create-namespace helm list -A | grep web helm install web local/mychart -n demo # what happens if you install again in the same namespace?
web demo 1 … deployed mychart-0.1.0 1.16.0 web demo2 1 … deployed mychart-0.2.0 1.17.0 Error: INSTALLATION FAILED: release name check failed: cannot reuse a name that is still in use
helm uninstall web -n demo; helm uninstall web -n demo2; kubectl delete ns demo2 helm repo remove local; pkill -f "http.server 8879"
Case 1: appVersion changed, version did not, so the cache “went back in time”
Problem: After every image build, CI changed only appVersion and then repackaged and pushed myapp-1.0.0.tgz. On some runners Helm cached the old package and deployed the old image; the same tag was overwritten in the OCI repository, so audits could not trace it. Approach: The chart version is incremented with every change (for example 1.0.0+build.123 Not allowed — OCI tags do not allow +, Helm replaces it with on push _; better to use 1.0.123), and pin it by digest at deploy time (Module 6). Limitation: Teams that decouple image tags from chart versions can bump the chart version only when the templates change, and pass the image tag in through values.
Case 2: a bloated index.yaml slows down CI
Problem: The self-hosted repository has accumulated 4000 versions,index.yaml over 20 MB, and every pipeline helm repo update has to download it once. Approach: Migrate to an OCI repository on ACR/ECR, and let CI directly helm pull oci://…, with no repo update needed; the old repository keeps only recent versions. Limitation: Downstream users who depend on the old repository URL must be notified of the migration in advance.
Case 3: release name collision
Problem: Two teams in the same namespace both use redis as the release name, and the one deployed later fails outright. Approach: Agree on the release name = <app>-<component> (e.g. orders-redis), with each team in its own namespace; in CI, use helm upgrade --install to keep it idempotent. Limitation: The release name flows into generated object names (e.g. orders-redis-master), and a name that is too long hits the 63-character label length limit; this is also the reason for the 53-character cap.
Common errors and fixes
Error: repo podinfo not found
Cause: The current machine (or CI runner) has no entry for this repository name in repositories.yaml.
helm repo list helm env HELM_REPOSITORY_CONFIG
Fix:helm repo add podinfo https://stefanprodan.github.io/podinfo; in CI, write it directly as --repo URL chart or use an OCI reference, to avoid depending on the runner's local state.
Error: INSTALLATION FAILED: chart "podinfo" matching 7.0.0 not found in podinfo index. (try 'helm repo update')
Cause: The locally cached index has no version that satisfies the constraint: the version does not exist, has not yet been repo update, or it is a pre-release version without --devel.
helm repo update podinfo helm search repo podinfo/podinfo --versions | head
Error: looks like "https://example.com/charts" is not a valid chart repository or cannot be reached: failed to fetch https://example.com/charts/index.yaml : 404 Not Found
Cause: There is no index.yaml under the URL (wrong address, missing path), or this is an OCI address but you used helm repo add.
Fix: Confirm that curl -sI URL/index.yaml returns 200; for an OCI repository, use oci:// the reference directly, and do not run repo add.
[ERROR] Chart.yaml: version 'v1' is not a valid SemVer
Cause: The chart's version must be SemVer (major.minor.patch, optionally with pre-release and build metadata).
Fix: Change it to 1.0.0 this format; only then can appVersion be an arbitrary string (e.g. "v1","2026.11").
release name "My_App" ... invalid / name too long
Cause: The release name must be lowercase letters, digits and -/., start and end with a letter or digit, and be no longer than 53 characters.
Fix: Change it to my-app; for a long name, use the chart's fullnameOverride to shorten the generated object names.
1. Without downloading to the current directory, view the line about replicaCount in podinfo 6.17.0's default values.
helm show values podinfo/podinfo --version 6.17.0 | grep -n replicaCount
2. Package ./myapp with chart version 0.2.0 and appVersion 1.1, and output it to the dist/ directory.
helm package ./myapp --version 0.2.0 --app-version 1.1 -d dist
You maintain an internal chart. The templates are unchanged; the application has just released version 2.4.0. A colleague says, “Just change appVersion, no need to touch the chart version.” What would you do?
I disagree. A chart is an immutable artifact: any file change (including appVersion in Chart.yaml) must bump the chart version, otherwise one version number maps to two different contents, and caches, OCI tags and audits all break. Choose one of two approaches: ① bump the chart version (e.g. 1.3.0 → 1.3.1) and update appVersion; ② if the image version changes very often, keep the chart stable and pass the image tag in via values (image.tag), and appVersion only denotes the “default recommended version”.
Verified teaching videos
Official documentation
- Charts (directory structure and Chart.yaml)
- The Chart Repository Guide
- helm search hub
- Artifact Hub documentation
Video storyboard script (about 80 seconds)
Visual: a folder expands into Chart.yaml, values.yaml, templates and charts; Chart.yaml glows.
Narration: a chart is just a directory. The only required file is Chart.yaml, which holds the name and version.
Visual: two labels side by side: version 6.17.0 (box icon) and appVersion 6.17.0 (app icon); a new sheet of paper goes into the box, and version goes up by one automatically.
Narration: version is the package's version and must be SemVer; appVersion is the application's version. If anything in the package changes, version must go up by one.
Visual: two namespaces, demo and prod, each with a hello; each one's revision card keeps growing.
Narration: a release name is unique only within its namespace. Every install, upgrade or rollback increments the revision by one.
Visual: on the left, an index.yaml manifest on a shelf; on the right, a block with a sha256 in an image registry.
Narration: a traditional repository relies on an index file; an OCI repository stores the chart as an artifact in the image registry and fetches it by tag or digest.
Module 3 · Install and upgrade: install / upgrade
- Walk through in order
helm upgrade --installthe internal steps, and point out when the release record is created (before applying objects , statuspending-*), and when it is finalized (deployed/failed). - Choose the right
--waitstrategy (hookOnlydefault /watcher/legacy) and--timeout, understand the--rollback-on-failuremeaning for install (uninstall) and upgrade (rollback to the last successful revision). - Understand the
--server-sidetrue/false/auto: new installs default to SSA, upgrades keep the previous revision's approach; know when field conflicts occur and the--force-conflictsrisks. - Use
--dry-run=serverto rehearse in a real cluster context, and know what it does and does not do.
What: three commands
| Command | release does not exist | release already exists | Applies to |
|---|---|---|---|
helm install NAME CHART | install, revision 1 | Error cannot reuse a name that is still in use | Manual first-time install |
helm upgrade NAME CHART | Error "NAME" has no deployed releases | upgrade, revision +1 | Explicit upgrade only |
helm upgrade --install NAME CHART (-i) | Goes through the install flow | Goes through the upgrade flow | CI/CD preferred: idempotent |
Special case: if the release's latest record is uninstalled (uninstalled with --keep-history ),upgrade --install will reinstall in 'replace' mode and keep the revision number; if the latest record is pending-*, it fails directly another operation (install/upgrade/rollback) is in progress (Module 8).
How: the full mechanism of upgrade --install (cross-checked against the Helm 4 source pkg/action )
- Decide which path to take: read the release history (list Secrets, label
name=NAME,owner=helm). No record → install; a record exists → upgrade, taking the latest revision as the “current release”; if the latest is pending, refuse. - Load the chart: local directory / repository cache / OCI; check
charts/whether the dependencies inkubeVersionare complete, and whether it meets the cluster version. - Merge values: the chart's
values.yaml←-ffiles (left to right) ←--setfamily; upgrades also apply the reuse/reset rules (Module 4); if there isvalues.schema.jsonthen validate it. - Render templates: Go template + built-in objects (
.Release,.Capabilitiesfrom real cluster API discovery), separate hooks (objects withhelm.sh/hookannotations) from regular manifests, sort by kind (Namespace, ServiceAccount, Secret, ConfigMap … before Deployment), and render NOTES.txt. If a post-renderer plugin is configured, it is called at this point. - Compare with the previous revision: resolve the manifest stored by the “current release” and the new manifest, yielding three kinds of objects: added (create), still present (update), and removed (delete). On install, instead check whether an object with the same name already exists and does not belong to this release (ownership check,
--take-ownershipcan be skipped). Note: the comparison is against the manifest of the previous revision, not the live state of objects in the cluster. - Record first: create the new release Secret
sh.helm.release.v1.NAME.vN, statuspending-installorpending-upgrade.--create-namespaceCreate the namespace before this step. - pre-install / pre-upgrade hooks (Lesson 6).
- Call the Kubernetes API: Server-Side Apply (
PATCH,Content-Type: application/apply-patch+yaml, field managerhelm) or client-side three-way merge patch; create added objects and delete removed ones.--force-replaceSwitch to delete-and-recreate. - Wait: according to the
--waitstrategy.watcherUse kstatus to determine whether each object has reachedCurrent(e.g. Deployment'sobservedGenerationcaught up, new replicas all Available; Job completion needs an additional--wait-for-jobs), and past--timeout(default 5m), it fails. - post-install / post-upgrade hooks.
- Finalize: on success → new revision
deployed, the old deployed revision changes tosuperseded, and prune per--history-max(default 10) clean up the oldest records; on failure → new revisionfailed, the old revision stays deployed; if you set--rollback-on-failure: on install failure, uninstall; on upgrade failure, roll back to the most recent successful revision (creating revision N+1).--cleanup-on-failDelete the objects newly created in this upgrade.
Key parameters (Helm 4.3, verified against the command reference and source)
| Flag | Default | Meaning and notes |
|---|---|---|
--install / -i | — | Install if the release does not exist |
--create-namespace | — | Create the namespace if it does not exist (with name=<ns> label). This namespace does not belong to , so uninstall will not delete it. |
--wait[=strategy] | Omitted: hookOnly; only write --wait: watcher | watcher: kstatus event-driven wait for all resources to be ready; hookOnly: wait only for hooks to complete; regular resource submission counts as success; legacy: Helm 3-style polling. --wait=true/false Still accepted but warns |
--timeout | 5m0s | Timeout for each Kubernetes operation (waits, hook Jobs) |
--wait-for-jobs | false | together with --wait : success requires Jobs to complete. |
--rollback-on-failure | — | On failure: install → uninstall; upgrade → roll back to the last successful revision. When set, --wait the default becomes watcher. Old name --atomic is deprecated. |
--server-side | install: true; upgrade/rollback: auto | auto = keep the previous revision's apply method. Releases installed with Helm 3 still use the client-side method on upgrade unless you explicitly set --server-side=true |
--force-conflicts | false | SSA: on field conflicts, forcibly take ownership (this overrides the HPA, other controllers or manual changes) |
--force-replace | false | Delete and recreate objects (causes downtime). Old name --force is deprecated |
--take-ownership | false | Skip the Helm ownership annotation check and take over existing objects |
--cleanup-on-fail | false | On upgrade failure, delete the objects newly created in this run |
--history-max | 10 | Maximum number of revisions kept per release; 0 means unlimited (upgrade/rollback only) |
--dry-run | none | client: does not contact the cluster; server: contacts the cluster (lookup, real Capabilities, OpenAPI validation, existing-object checks on install), but does not create objects or write release records, and does not hand objects to the API server for admission. Used together with --hide-secret hides Secret content |
--version | latest stable | chart version constraint; production must pin it |
--description,--labels | — | Notes and custom labels written to the release record (visible in helm history ) |
What Server-Side Apply means in Helm 4
- Helm hands the full desired objects to the API server, which merges them and records
managedFields: Helm owns the fields it wrote; other managers (HPA,kubectl edit, controllers) each own their own fields. - Conflict: when a field Helm wants to change is owned by another manager, the API server returns a conflict (
Apply failed with 1 conflict: conflict with "…" …: .spec.replicas), and the upgrade fails. This is safer than Helm 3's “silent overwrite”. Handling: ① do not set fields in the chart that others manage (e.g. when the HPA takes over, do not renderreplicas; ② use--force-conflictsonly once you confirm you want to overwrite. - Migration: releases installed with Helm 3 record the apply method as client-side;
--server-side=autodoes not switch automatically. Once you are ready, run oncehelm upgrade … --server-side=true, and Helm upgrades the objects' client-side field managers to SSA.
When: recommended production combination
helm upgrade --install myapp ./myapp \ -n myapp --create-namespace \ --version 0.2.0 -f values-prod.yaml \ --wait --timeout 5m --rollback-on-failure \ --history-max 10 --description "deploy $GIT_SHA"
--wait, helm showing deployed means it was applied correctly” — in Helm 4, omitting --wait means hookOnly: an object is marked deployed as soon as it is submitted, even if Pods stay in CrashLoopBackOff. ② “--rollback-on-failure rolls back to the previous revision” — it rolls back to the previous successful revision. ③ “Helm compares the live state of objects in the cluster” — upgrades compare the manifest recorded for the previous revision; manual changes are exposed through SSA field ownership (conflicts), not “seen” by Helm. ④ “--create-namespace -created namespaces are deleted on uninstall” — no. ⑤ “--dry-run=server can detect admission webhook rejections” — no, it does not submit objects to the API server.Flowchart: decisions and states of upgrade --install
Sequence diagram: conversation between Helm and the API server during a successful upgrade
helm upgrade … --debug and the API server audit log to observe the same orderingCore animation: the full mechanism of helm upgrade --install
Select a scenario first, then step through it. On the right is the live state of the release Secret in the namespace; the terminal below shows the real behavior of each step. Play the 4 scenarios in order to compare how the release record changes.
Core commands and flags
# 1) Dry run: render and validate in the real cluster context, creating nothing helm upgrade --install hello podinfo/podinfo --version 6.17.0 -n demo \ --set replicaCount=2 --dry-run=server --hide-secret | head -30 # 2) Real upgrade: wait for readiness, roll back automatically on failure helm upgrade --install hello podinfo/podinfo --version 6.17.0 -n demo \ --set replicaCount=2 --wait --timeout 3m --rollback-on-failure --description "scale to 2" helm history hello -n demo
Release "hello" has been upgraded. Happy Helming! NAME: hello LAST DEPLOYED: Sun Nov 15 10:21:40 2026 NAMESPACE: demo STATUS: deployed REVISION: 2 ... REVISION UPDATED STATUS CHART APP VERSION DESCRIPTION 1 Sun Nov 15 10:02:11 2026 superseded podinfo-6.17.0 6.17.0 Install complete 2 Sun Nov 15 10:21:40 2026 deployed podinfo-6.17.0 6.17.0 scale to 2
| Desired result | How |
|---|---|
| Idempotent deploy in CI, with rollback on failure | helm upgrade -i NAME CHART --version X -f v.yaml --wait --rollback-on-failure --timeout 10m |
| Wait only for the Deployment to be ready, without automatic rollback | --wait (equivalent to --wait=watcher) |
| Keep Helm 3's wait behavior | --wait=legacy |
| Switch a legacy Helm 3 release to SSA | helm upgrade NAME CHART --reuse-values --server-side=true |
| Take over a same-named object created by kubectl | --take-ownership (first confirm the object really should belong to this release) |
| Inspect the detailed Helm–API interaction | --debug |
How to verify:helm status NAME --show-resources List the objects managed by the release and their status; kubectl get deploy NAME -o jsonpath='{.metadata.managedFields[*].manager}' should include helm. Common mistake: Writing --wait as --wait true (with a space in the middle) —true it is treated as a positional argument (chart), which causes a wrong-number-of-arguments error; write it as --wait=true or simply --wait.
Lab 3: upgrade, cause a failure, and observe automatic rollback (about 7 minutes)
helm upgrade hello podinfo/podinfo --version 6.17.0 -n demo --reuse-values \ --set image.tag=does-not-exist helm list -n demo kubectl -n demo get pods
Release "hello" has been upgraded. Happy Helming! NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION hello demo 3 … deployed podinfo-6.17.0 6.17.0 NAME READY STATUS RESTARTS AGE hello-podinfo-6d8c9f7b5-x2kqp 1/1 Running 0 20m hello-podinfo-6d8c9f7b5-7ptzn 1/1 Running 0 4m hello-podinfo-5f6b8d9c4-9wq2l 0/1 ImagePullBackOff 0 12s
Helm shows deployed, but the new Pod cannot pull the image (old Pods still serve traffic during the rolling update). Without --wait the default is hookOnly: a resource counts as successful once it is submitted.
helm rollback hello 2 -n demo --wait # first go back to a healthy state helm upgrade hello podinfo/podinfo --version 6.17.0 -n demo --reuse-values \ --set image.tag=does-not-exist --wait --timeout 60s --rollback-on-failure echo "exit=$?" helm history hello -n demo
Rollback was a success! Happy Helming! Error: UPGRADE FAILED: release hello failed, and has been rolled back due to rollback-on-failure being set: context deadline exceeded exit=1 REVISION UPDATED STATUS CHART APP VERSION DESCRIPTION 1 … superseded podinfo-6.17.0 6.17.0 Install complete 2 … superseded podinfo-6.17.0 6.17.0 scale to 2 3 … superseded podinfo-6.17.0 6.17.0 Upgrade complete 4 … superseded podinfo-6.17.0 6.17.0 Rollback to 2 5 … failed podinfo-6.17.0 6.17.0 Upgrade "hello" failed: context deadline exceeded 6 … deployed podinfo-6.17.0 6.17.0 Rollback to 4
Reading this table: revision 5 is the failed upgrade (kept as failed for audit). Revision 6 is the new revision created by the automatic rollback, with content equal to the last successful revision 4. CI gets a non-zero exit code and the pipeline turns red. The exact error text during the timeout wait may vary slightly with the kstatus state.
kubectl -n demo scale deploy hello-podinfo --replicas=4 # another manager changed replicas
helm upgrade hello podinfo/podinfo --version 6.17.0 -n demo --reuse-values --set replicaCount=3
kubectl -n demo get deploy hello-podinfo -o jsonpath='{range .metadata.managedFields[*]}{.manager}{" "}{.operation}{" "}{.subresource}{"\n"}{end}'
Error: UPGRADE FAILED: … Apply failed with 1 conflict: conflict with "kubectl" with subresource "scale" using apps/v1: .spec.replicas helm Apply kubectl Update scale kube-controller-manager Update status
If a conflict appears: replicas has already been kubectl scale taken over by another manager. The right move is to decide who owns replicas: to hand it to Helm, add --force-conflicts once to take it back; to hand it to the HPA, enable autoscaling.enabled, so the template no longer renders replicas. If your environment shows no conflict, still remember this error shape.
# Can find: cluster OpenAPI validation failures (unknown fields / type errors), unmet kubeVersion, same-name object conflicts on install helm install hello2 podinfo/podinfo -n demo --dry-run=server --set replicaCount=abc 2>&1 | tail -2 # Cannot find: missing images, admission webhook rejections, insufficient quota — these are only known after a real submission
Error: INSTALLATION FAILED: unable to build kubernetes objects from release manifest: error validating "": error validating data: … spec.replicas … expected integer …
Case 1: the pipeline is all green, but production is in CrashLoopBackOff
Problem: When the team moved from Helm 3 to Helm 4, they removed --atomic (seeing the deprecation warning) but did not add --wait. In Helm 4, omitting --wait is equivalent to hookOnly, so the bad version was marked deployed and the pipeline passed. Approach: Uniformly use --wait --rollback-on-failure --timeout 10m; configure readinessProbe for the Deployment, along with progressDeadlineSeconds, so kstatus can flag failure as early as possible. Limitation: kstatus only understands built-in resources and CRs that follow the standard status convention (conditions,observedGeneration) CRs; CRs that do not follow the convention may be treated as ready immediately.
Case 2: HPA and Helm compete over replicas
Problem: The chart always renders replicas: 3, the HPA scales to 12 at peak; each release, Helm 3 resets replicas to 3, causing flapping. After moving to Helm 4 (SSA), the upgrade fails directly with a field conflict. Approach: In the template, {{- if not .Values.autoscaling.enabled }} replicas: … {{- end }} (the helm create scaffold already does this), so when the HPA is enabled the field is not rendered and belongs to the HPA. Limitation: When switching from “rendering replicas” to “not rendering”, SSA hands back fields Helm no longer owns; verify once after a release that the replica count was not reset.
Case 3: a large chart upgrade times out and triggers a wrong rollback
Problem: A platform chart with 40 Deployments; nodes pull images slowly, the default 5-minute timeout triggers an automatic rollback, and the rollback itself takes another 5 minutes. Approach: Set --timeout 15m according to the actual rollout time; pre-pull images; split the chart. Limitation: the rollback is bound by the same timeout too; a failed rollback leaves behind failed rollback revision that needs manual intervention (Lesson 7).
Common errors and fixes
Error: UPGRADE FAILED: "myapp" has no deployed releases
Cause: Used helm upgrade (without --install), but the release does not exist.
Fix: switch to helm upgrade --install; confirm -n the namespace is correct (helm list -A -a | grep myapp).
Error: UPGRADE FAILED: release hello failed, and has been rolled back due to rollback-on-failure being set: context deadline exceeded
Cause: Waiting for resources to become ready timed out (image pull failure, probe failure, insufficient resources Pending, PVC not bound, …), so it was automatically rolled back. Helm only tells you “timeout”; the root cause is in the objects themselves.
helm history hello -n demo helm get manifest hello -n demo --revision 5 | grep -n image: kubectl -n demo get pods; kubectl -n demo describe pod POD | tail -20 kubectl -n demo get events --sort-by=.lastTimestamp | tail
Fix: Fix the root cause and redeploy; if the rollout really takes that long, increase --timeout.
Apply failed with 1 conflict: conflict with "kubectl-edit" using apps/v1: .spec.template.spec.containers[name="app"].image
Cause: SSA field conflict: someone changed a Helm-managed field using kubectl edit/set image ; the field is now owned by another manager.
kubectl get deploy X -o yaml --show-managed-fields | less
Fix: After confirming the manual change should be overwritten, upgrade once more using --force-conflicts ; establish the convention that changes are made only through Helm/GitOps.
Error: INSTALLATION FAILED: unable to continue with install: Service "hello-podinfo" in namespace "demo" exists and cannot be imported into the current release: invalid ownership metadata; …
Cause: an object with the same name already exists but does not belong to this release (missing app.kubernetes.io/managed-by=Helm labels and meta.helm.sh/release-name/release-namespace annotations, or the annotations point to another release). See the Module 8 troubleshooting tree.
Fix: delete the old objects; or, after confirming, --take-ownership; or manually add the labels and annotations before installing.
Error: INSTALLATION FAILED: create: failed to create: namespaces "myapp" not found
Cause: The target namespace does not exist, and you did not add --create-namespace.
Fix: Add --create-namespace, or have the platform process pre-create the namespace (with quotas, LimitRange and labels).
1. Write an idempotent deploy command: release myapp, chart ./myapp, namespace myapp (created if it does not exist), using values-prod.yaml, waiting up to 8 minutes for readiness, and rolling back automatically on failure.
helm upgrade --install myapp ./myapp -n myapp --create-namespace -f values-prod.yaml --wait --timeout 8m --rollback-on-failure
2. A release web was installed in the Helm 3 era. You want to switch it to Server-Side Apply at the next upgrade without changing values.
helm upgrade web CHART --version X -n NS --reuse-values --server-side=true
While upgrading to revision 7, your CI runner was forcibly killed during the “applying objects” stage. Running the same upgrade again afterwards fails with the error another operation (install/upgrade/rollback) is in progress. Explain the cause and give a safe recovery approach.
Helm had already written revision 7 before applying objects, with status pending-upgrade; after the process was killed, nobody finalized it as deployed or failed. Later commands see that the latest revision is pending and refuse to continue, to prevent concurrent operations. Recovery: ① confirm no other helm process is actually running (check CI); ② use helm history to view it; ③ usually use helm rollback NAME 6 to return to the last successful revision (this creates revision 8), then upgrade again; ④ only when rollback is impossible, consider deleting the pending sh.helm.release.v1.NAME.v7 (back it up first; Lesson 7 covers this in detail).
Verified teaching videos
No verified video explaining Helm 4 Server-Side Apply and kstatus waiting was found; please rely on this lesson's animation and the official documentation.
Official documentation
- helm upgrade command reference
- helm install command reference
- Helm 4 Overview (SSA, renamed parameters)
- Kubernetes Server-Side Apply
Video storyboard script (about 100 seconds)
Visual: in the terminal, helm upgrade --install is typed; the camera pulls back to reveal a process strip of 11 cells.
Narration: one command, eleven steps. First decide whether to install or upgrade, then load the chart, merge values, and render templates.
Visual: a ledger icon: a new page v3 is written as pending-upgrade, and only then does an arrow shoot toward the API server.
Narration: Helm records first, then acts. The new release record is written to the cluster in pending state before objects are applied.
Visual: a PATCH request carries the fieldManager helm label; the Deployment's fields are color-coded by owner; on the kstatus dashboard the needle moves from InProgress to Current.
Narration: Helm 4 uses server-side apply by default, so field ownership is crystal clear. With wait, it uses kstatus to keep waiting until all objects are truly ready.
Visual: a fork: the green path shows v3 deployed and v2 superseded; the red path shows v3 failed, followed by v4 Rollback to 2.
Narration: on success, finalize; on failure, with rollback-on-failure, Helm automatically rolls back to the last successful version and fails the pipeline.
Module 4 · Values: overrides, precedence and inspection
- List all sources of values and their exact precedence: chart
values.yaml<-f(left to right) <--set-json<--set<--set-string<--set-file<--set-literal. - Predict merge results: deep merge for maps, whole replacement for lists,
nulldeletes chart default keys; master the--setlist, index, escape syntax and type inference. - Explain the difference between
helm get valuesand--all; the four values behaviors on upgrade (no flags /--reuse-values/--reset-values/--reset-then-reuse-values).
What: values are the input to templates
In templates, the {{ .Values.replicaCount }} reads a merged values tree. The chart author writes defaults and comments in values.yaml (a kind of “configuration interface docs”); users override them with files and the command line.
How: sources and precedence (merge order in the source pkg/cli/values/options.go )
| order (later overrides earlier) | Source | Notes |
|---|---|---|
| 1 | The chart's values.yaml | parent chart's values can also override the default values of a subchart (Lesson 3) |
| 2 | -f/--values File | can be specified multiple times; the one on the right overrides the one on the left; supports local paths,- (stdin), http(s) URLs |
| 3 | --set-json | key=JSON or whole JSON objects, suitable for passing arrays/objects |
| 4 | --set | dot-notation paths, with automatic type inference |
| 5 | --set-string | Forced to be a string (version numbers, long numbers,"true") |
| 6 | --set-file | Value taken from file contents (certificates, scripts, long configs) |
| 7 | --set-literal | literal string; no parsing of commas, dots or braces |
--set* are merged by type, merged in order, not by the position they appear on the command line: --set-string a=x --set a=y The result of x is (--set-string merged after --set ), and only when the same flag is repeated does the later one override the earlier one.Merge rules
| Type | Rule | Example |
|---|---|---|
| map (object) | deep merge: only overrides the keys you write; other keys are kept | default image: {repository: nginx, tag: ""} + --set image.tag=1.27 → repository is still nginx |
| list (array) | whole replacement, not merged or appended element by element | default tolerations: [A] + file's tolerations: [B] → only [B] |
| scalar | overridden directly | replicaCount: 1 → 3 |
null | delete that key in the chart's default values | --set resources=null or in YAML livenessProbe: null |
--set Syntax quick reference
| Syntax | Result |
|---|---|
--set a.b=c,d=e | {a: {b: c}, d: e} (comma-separated for several) |
--set list={x,y} | list: [x, y] |
--set servers[0].port=80 | Set list element 0 (padded with empty elements if missing) |
--set name=a\,b,--set nodeSelector."kubernetes\.io/os"=linux | escaped comma, dot |
--set replicas=3 / --set enabled=true | integer / boolean (auto-inferred) |
--set-string tag=1.10 | string "1.10" (use --set may be treated as the number 1.1) |
--set-json 'tolerations=[{"key":"gpu","operator":"Exists"}]' | Get complex structures right in one go |
--set-file config=./app.ini | value is the full contents of the file |
Inspect: helm get values
helm get values NAME: outputs only user-supplied values (the release record'sconfig).helm get values NAME --all: outputs the full set of values merged with the chart defaults all computed values— the tree the template actually sees.--revision NView a historical revision's values;-o jsoneasy for scripts to process.
Where values come from on upgrade (the most error-prone place)
| Form | chart defaults | previous user values | this time's -f / --set | Typical risk |
|---|---|---|---|---|
| No flags, and no -f/--set this time | new chart | reused | — | — |
| No flags, but -f or --set this time | new chart | dropped | uses | wanted to change only one value, but previously --set all values revert to defaults |
--reuse-values | last computed values (new chart defaults ignored) | reused | overlaid on top | new or changed chart defaults do not take effect; even new keys referenced by templates become empty |
--reset-values | new chart | dropped | uses | same as 'no flags but --set', with clearer semantics |
--reset-then-reuse-values | new chart | reused | overlaid on top | usually what you want for manual upgrades (available since Helm 3.14) |
Precedence: --reset-values > --reuse-values > --reset-then-reuse-values (when both are present, the former takes effect). Production best practice is not to rely on any of the three: keep each environment's complete values in Git, and on every helm upgrade -f values-prod.yaml, so the outcome is determined only by “chart version + files in Git”.
env,tolerations you must write the full list. ② “helm get values shows the effective configuration” — without --all it is only the part you passed in. ③ “--reuse-values is the safest upgrade method” — it masks changes to new chart defaults. ④ “--set image.tag=1.10 gets string 1.10” — it is inferred as a number (rendered as 1.1 by YAML); for version numbers, use --set-string or in templates, | quote. ⑤ “Putting passwords in values is convenient” — they enter the release Secret in plain text (Module 1).Layered diagram: values stacked bottom-up
helm get values output without --allComparison diagram: value sources for four upgrade methods
Interactive 1: values merge simulator
Tick the sources to layer; the right side shows the merged .Values, with each leaf value labeled with the layer it came from. Try ticking --set-string and --set, and null to delete.
Interactive 2: the four values behaviors on upgrade
The release was installed at revision 1 with --set replicaCount=3 --set ingress.enabled=true using chart 0.1.0. Now upgrading to chart 0.2.0 (the default service.port changes from 80 to 8080, and adds podDisruptionBudget.enabled: true, and this time the command includes --set image.tag=1.1.
Core commands and flags
| Command | Purpose | Notes |
|---|---|---|
helm show values CHART | View the chart's default values | Read them before writing an override file |
helm get values NAME | user-supplied values | --all,--revision N,-o yaml|json|table |
helm template … --show-only templates/x.yaml | shows only the rendering result of a given template under a given set of values | Verify whether values take effect (Module 7) |
-f a.yaml -f b.yaml | Multi-file overlay | b overrides a |
--set / --set-string / --set-json / --set-file / --set-literal | Command-line override | see the syntax table on the principles page |
--reuse-values / --reset-values / --reset-then-reuse-values | Where values come from on upgrade | only helm upgrade |
helm get values hello -n demo helm get values hello -n demo --all | grep -E '^(replicaCount|image):' -A3
USER-SUPPLIED VALUES: replicaCount: 2 image: pullPolicy: IfNotPresent repository: ghcr.io/stefanprodan/podinfo tag: 6.17.0 replicaCount: 2
(The automatic rollback in Lab 3 restores the revision 2 config, i.e. replicaCount: 2; if in step 3 of Lab 3 you ran a successful upgrade with --force-conflicts here it would be 3. --all The output is sorted by key name; the exact image fields follow the chart's real defaults.)
# Type inference comparison: use helm template to see the rendered result directly (the podinfo template puts the tag into the image field) helm template t podinfo/podinfo --version 6.17.0 --set image.tag=1.10 | grep 'image:' helm template t podinfo/podinfo --version 6.17.0 --set-string image.tag=1.10 | grep 'image:'
image: ghcr.io/stefanprodan/podinfo:1.1
image: ghcr.io/stefanprodan/podinfo:1.10
How to verify: Preview any override first with helm template or --dry-run=server to see the result. Common mistakes: In the shell, values in {},[], and ! containing special characters need single quotes: --set 'list={a,b}'. Production use:helm get values NAME -o yaml > values-backup.yaml is the standard backup step before migrating or rebuilding a release.
Lab 4: multi-environment values and the four upgrade behaviors (about 7 minutes)
~/helmlab/mychart generated in Module 2):
cd ~/helmlab
cat > values-common.yaml <<'EOF'
replicaCount: 2
podLabels:
team: web
tolerations:
- key: "dedicated"
operator: "Equal"
value: "web"
effect: "NoSchedule"
EOF
cat > values-prod.yaml <<'EOF'
replicaCount: 3
tolerations:
- key: "prod"
operator: "Exists"
effect: "NoSchedule"
resources:
requests: { cpu: 50m, memory: 32Mi }
EOF
helm template web ./mychart -f values-common.yaml -f values-prod.yaml --show-only templates/deployment.yaml \
| grep -E 'replicas:|team:|key:|cpu:'
replicas: 3
team: web
cpu: 50m
- key: prod
replicaCount was overridden by prod; podLabels (a map) kept team from common; tolerations (a list) was replaced entirely, and the dedicated entry disappeared.
helm install web ./mychart -n demo -f values-common.yaml -f values-prod.yaml --set podLabels.tier=frontend helm get values web -n demo
USER-SUPPLIED VALUES:
podLabels:
team: web
tier: frontend
replicaCount: 3
resources:
requests:
cpu: 50m
memory: 32Mi
tolerations:
- effect: NoSchedule
key: prod
operator: Existshelm upgrade web ./mychart -n demo --set-string image.tag=1.27
helm get values web -n demo
kubectl -n demo get deploy web-mychart -o jsonpath='{.spec.replicas}{"\n"}'
USER-SUPPLIED VALUES: image: tag: "1.27" 1
The replica count returned to the chart default of 1, and tolerations and resources all disappeared — because this time there was --set but no reuse flag was added.
helm rollback web 1 -n demo
# Simulate a chart upgrade: the new version adds a default annotation to Pods and bumps the chart version
sed -i 's/^podAnnotations: {}$/podAnnotations: {owner: platform}/' mychart/values.yaml
sed -i 's/^version: 0.1.0$/version: 0.2.0/' mychart/Chart.yaml
helm upgrade web ./mychart -n demo --reuse-values --set-string image.tag=1.27
helm get values web -n demo --all | grep -E '^replicaCount|^podAnnotations|owner:'
helm upgrade web ./mychart -n demo --reset-then-reuse-values --set-string image.tag=1.27
helm get values web -n demo --all | grep -E '^replicaCount|^podAnnotations|owner:'
Rollback was a success! Happy Helming!
podAnnotations: {}
replicaCount: 3
podAnnotations:
owner: platform
replicaCount: 3
--reuse-values The replica count was kept, but the default annotation added in chart 0.2.0 was blocked out (it uses the previous revision's computed values); --reset-then-reuse-values to get both. The service.port example in the diagram and Interactive 2 is the same principle.
helm template web ./mychart --set livenessProbe=null --show-only templates/deployment.yaml | grep -c livenessProbe
helm template web ./mychart --set-json 'podLabels={"a":"1","b":"2"}' --show-only templates/deployment.yaml | grep -E ' a:| b:'
0
a: "1"
b: "2"helm uninstall web -n demo
mychart is now 0.2.0 (with the default annotation); Module 6 will push it to an OCI repository.
Case 1: a “change one label” release scaled production replicas down to 1
Problem: The on-call engineer ran helm upgrade api ./chart --set image.tag=v2.3.1 an urgent fix; as a result, the replica count, resources and node affinity previously set via --set all reverted to defaults, leaving the API with 1 replica. Approach: Immediately helm rollback api; afterwards mandate that all environments' values be stored in a Git repository, with the release command fixed to -f envs/prod.yaml --set-string image.tag=$TAG,--set with --set only allowed for image tags. Limitation: CI needs to verify that the values file exists, to prevent silently falling back to defaults when a path is mistyped (pair it with required in values.schema.json, Lesson 3).
Case 2: --reuse-values makes a chart upgrade “look successful but missing config”
Problem: The ingress-nginx chart's major version upgrade added required defaults, and the team habitually used --reuse-values, so the new keys referenced in templates were empty and rendered invalid config. Approach: When upgrading third-party charts, switch to --reset-then-reuse-values, or better, a “complete values file + helm diff review” (Module 7); first use diff <(helm show values X --version old) <(helm show values X --version new) to inspect default value changes. Limitation:--reset-then-reuse-values Keys from the old version that the new chart renamed or deprecated are still carried over and need manual cleanup.
Case 3: version 1.10 became 1.1
Problem: In CI, --set image.tag=$VERSION, when the version is 1.10 deployed the :1.1 image. Approach: Uniformly use --set-string image.tag=…; in chart templates, image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" wrap it in quotes. Limitation: Values already inferred as numbers cannot be restored verbatim in templates (1.10 becomes the float 1.1 at parse time).
Common errors and fixes
After upgrade, configuration “disappeared”: replica count, resources and affinity reverted to defaults
Cause: This upgrade included -f or --set, but without a reuse flag, so the previous user values were discarded.
helm get values NAME --revision PREV helm get values NAME
Fix:helm rollback NAME PREV; afterwards use a complete values file or --reset-then-reuse-values.
Error: failed parsing --set data: key "x" has no value (cannot end with ,)
Cause: A value contains an unescaped comma, or shell expansion broke the arguments.
Fix:--set 'hosts={a.com,b.com}' (this is a list); if the value itself contains commas, use \,, or switch to --set-literal / --set-json / a values file.
Error: … json: cannot unmarshal string into Go struct field Container.spec.template.spec.containers.ports.containerPort of type int32
Cause: Using --set-string or YAML quotes turned a value that should be an integer into a string.
Fix: for numbers, use --set, or in templates {{ .Values.port | int }}.
Error: open values-prod.yml: no such file or directory
Cause:-f The file path is relative to the current working directory, and in CI the working directory is often not the repository root.
Fix: use an absolute path or $(git rev-parse --show-toplevel)/envs/prod.yaml.
After overriding env/tolerations, the chart's default entries disappeared
Cause: list whole replacement.
Fix: write out the complete list in the override file; chart authors can provide extraEnv,extraVolumes style “append” entries, and in the template concatenate default items with extra items (Lesson 2).
1. View all values actually used by the templates for release hello at revision 2, and output them as JSON.
helm get values hello -n demo --revision 2 --all -o json
2. At install time, set a tolerations list with two elements, and make sure the image tag 2.10 is handled as a string.
helm install web ./mychart --set-json 'tolerations=[{"key":"a","operator":"Exists"},{"key":"b","operator":"Exists"}]' --set-string image.tag=2.10A colleague says: “We always release with --reuse-values, which is the safest, since it never loses configuration.” Evaluate this and propose your approach.
It does not lose the previous user values, but it uses the previous revision's “computed values” as the base, so changes in new chart version defaults (new keys, fixed defaults, changed ports) never take effect. Over time the release drifts badly from the chart version, and the effective configuration exists only in the release Secret in the cluster, so it cannot be reviewed or rebuilt. Recommendation: keep each environment's complete values file in Git, and at release time only use -f + a few --set-string image.tag; when manually upgrading third-party charts, use --reset-then-reuse-values and first helm diff.
Verified teaching videos
No verified video specifically explaining --reset-then-reuse-values and --set* merge order was found; the rules in this module come from the Helm source and the command reference.
Official documentation
Video storyboard script (about 80 seconds)
Visual: five layers of transparent film stacked from the bottom up: values.yaml, -f common, -f prod, --set, --set-file; the final result is projected at the top.
Narration: values are like stacked film; the higher, the higher the priority. The file on the right overrides the one on the left, and the command line overrides the files.
Visual: two map puzzle pieces fit together, replacing only one piece; of two lists, one directly covers the other.
Narration: objects are deep-merged, changing only the keys you write; arrays are replaced whole; writing null removes a default value.
Visual: four doors: no flags, reuse, reset, reset-then-reuse; behind each door, a different configuration box.
Narration: during an upgrade, where values come from depends on the flags. Passing only a --set without reuse loses all previous settings.
Visual: the values-prod.yaml icon from the Git repository is dragged into the helm upgrade command.
Narration: the most reliable approach: a complete values file in Git, passed explicitly every time.
Module 5 · Rollback, history and uninstall
- Read
helm history, and explain the meaning and transitions of the 9 release states (pending-install/upgrade/rollback,deployed,superseded,failed,uninstalling,uninstalled,unknown). - Use correctly
helm rollback: know that it creates a new revision; that without a revision number the target is “current − 1” (not necessarily a successful one); and what it does and does not restore. - Understand
helm uninstallwhat is deleted and what is kept (namespaces, StatefulSet PVCs,helm.sh/resource-policy: keepobjects), and--keep-history's purpose.
What: release states (source pkg/release/common/status.go)
| State | Meaning | Written by |
|---|---|---|
pending-install | Install in progress | install, before applying objects |
pending-upgrade | Upgrade in progress | upgrade, before applying objects |
pending-rollback | Rollback in progress | rollback, before applying objects |
deployed | Currently effective revision (normally only one) | After a successful operation |
superseded | Was once deployed, now superseded by a newer revision | When a later operation succeeds |
failed | The operation for this revision failed | When the operation fails |
uninstalling | Uninstall in progress | When uninstall starts |
uninstalled | Uninstalled, history retained | uninstall --keep-history |
unknown | Unknown status (abnormal situation) | — |
helm list By default only shows deployed and failed; the -a flag shows all, and --pending,--uninstalled,--superseded,--failed,--deployed can be filtered individually.
How: the real behavior of rollback
- Reads the latest revision (current) and the target revision.
helm rollback NAMEWhen no target is given, target = current revision − 1— if the previous one is failed, you will roll back to a failed configuration! - Creates a new revision N+1: chart and config (user values) copied from the target revision, description
Rollback to X, statuspending-rollback. - Runs pre-rollback hooks → treats the current revision's manifest as “old” and the target manifest as “new”, computes added/updated/deleted objects and applies them (
--server-sideby defaultauto, reusing the target revision's apply method) → per--waitsetting, wait → post-rollback hooks. - On success: all previous
deployedrevisions change tosuperseded, and N+1 becomesdeployed; on failure: N+1 becomesfailed.
| rollback restores | rollback does not restore |
|---|---|
| the release-managed object manifests (Deployment templates, ConfigMap contents, Service…) | Data in PVCs/databases (schema migrations are not reversed) |
| the target revision's user values and chart version | crds/ CRDs in the chart's directory (Helm never upgrades or deletes them) |
| objects deleted by the new version (re-created) | external state outside the cluster (DNS records, cloud resources, messages in a queue) |
Manually added kubectl edit fields not in the manifest |
How: what uninstall deletes
- Runs pre-delete hooks → deletes all objects in the current release manifest (in the reverse of install kind order;
--cascade background|foreground|orphancontrols cascading, default background) → post-delete hooks → deletes all revision Secrets for this release. - Keeps: namespaces (even if
--create-namespacecreated by it); StatefulSetvolumeClaimTemplatesgenerated PVCs (not in the manifest); objects annotated withhelm.sh/resource-policy: keep(they become “orphans”; reinstalling a release with the same name triggers “resource already exists”); CRDs. --keep-history: objects are deleted as usual, but revision records are kept, and the latest becomesuninstalled. Afterwards you canhelm historyaudit it, and also canhelm rollback NAME N“revive” it;helm upgrade --installreinstalling with the same name also works.- Other flags:
--wait(wait for objects to be truly deleted),--timeout,--no-hooks,--ignore-not-found(returns success even if the release does not exist, suitable for cleanup scripts),--dry-run,--description.
How: how much history is kept —
helm upgrade and helm rollback 's --history-max default 10 (environment variable HELM_MAX_HISTORY can change the default), and when exceeded the oldest records are deleted (the one currently deployed is never deleted). Setting 0 means unlimited — unbounded history piles up many Secrets in the namespace and slows every list request that reads history.
When: rollback vs roll-forward
| Situation | Recommended |
|---|---|
| New version has a bug, and the old version is compatible with current data | helm rollback NAME <last good revision> --wait, then fix and publish again |
| New version performed an irreversible database migration | Roll forward: publish a fixed version (rollback only reverts code, not data structures, which can make things worse) |
| GitOps-managed release | Revert in Git and let Argo CD/Flux deploy (running directly helm rollback will be overwritten by reconciliation, Lesson 5) |
helm rollback NAME goes back to the previous good version” — it goes back to current − 1, which may be the failed one. ③ “uninstall deletes the namespace and data” — both the namespace and the StatefulSet PVCs are kept. ④ “rollback still works after uninstall” — only if --keep-history is used.State machine: the life of a revision
Timeline: a failed upgrade and two kinds of rollback
Interactive simulator: release state machine
Perform any operation on the release named myapp ; watch how the revision table and the Secrets in the namespace change. Try: two successful upgrades → a failed upgrade → rollback without a number (what happens?) → uninstall keeping history → revive by rollback.
Core commands and flags
| Command | Purpose | Key flags |
|---|---|---|
helm history NAME | revision list (status, chart, description) | --max (default 256),-o yaml|json |
helm rollback NAME [REV] | publishes a new revision with the old revision's chart + values | --wait[=watcher],--timeout,--cleanup-on-fail,--force-replace,--server-side (auto),--force-conflicts,--no-hooks,--history-max,--description |
helm uninstall NAME… | deletes the release's objects and records | --keep-history,--wait,--cascade,--ignore-not-found,--no-hooks,--dry-run |
helm list filter | Find by status | -a,--failed,--pending,--uninstalled,--superseded |
helm status NAME --revision N | View status and NOTES for a historical revision | --show-resources (current revision) |
helm history hello -n demo --max 5 helm rollback hello 2 -n demo --wait --description "roll back to known-good rev 2"
REVISION UPDATED STATUS CHART APP VERSION DESCRIPTION 2 Sun Nov 15 10:21:40 2026 superseded podinfo-6.17.0 6.17.0 scale to 2 3 Sun Nov 15 10:25:02 2026 superseded podinfo-6.17.0 6.17.0 Upgrade complete 4 Sun Nov 15 10:26:10 2026 superseded podinfo-6.17.0 6.17.0 Rollback to 2 5 Sun Nov 15 10:27:20 2026 failed podinfo-6.17.0 6.17.0 Upgrade "hello" failed: context deadline exceeded 6 Sun Nov 15 10:27:25 2026 deployed podinfo-6.17.0 6.17.0 Rollback to 4 Rollback was a success! Happy Helming!
How to verify:helm get values NAME Should match the target revision (helm get values NAME --revision 2); kubectl rollout history deploy/X You will also see the Deployment gain one more revision. Common mistakes: Confusing the Helm revision with the Deployment's rollout revision. The two are numbered independently. Production use:--description Record the ticket number,helm history which makes it a release audit record.
Lab 5: Rollback pitfalls, uninstall with history kept, and resurrection (about 6 minutes)
The revision numbers below assume that at the end of Lab 3 the latest revision of hello is 6 (Rollback to 4). If you created extra revisions in step 3 of Lab 3, use your own helm history revision numbers and adjust the commands accordingly.
helm upgrade hello podinfo/podinfo --version 6.17.0 -n demo --reuse-values \ --set image.tag=bad-tag --wait --timeout 40s helm history hello -n demo --max 3
Error: UPGRADE FAILED: release hello failed: context deadline exceeded REVISION … STATUS … DESCRIPTION 6 … deployed … Rollback to 4 7 … failed … Upgrade "hello" failed: context deadline exceeded
Note that revision 6 is still deployed: a failed upgrade does not mark the previous successful release as superseded. helm list but what is shown is the latest revision 7 (failed).
helm rollback hello -n demo --wait # → revision 8 = Rollback to 6 helm rollback hello -n demo --wait --timeout 40s # → revision 9 = Rollback to 7 (the failed config!) helm history hello -n demo --max 3
Rollback was a success! Happy Helming! Error: release hello failed: context deadline exceeded REVISION … STATUS … DESCRIPTION 7 … failed … Upgrade "hello" failed: context deadline exceeded 8 … deployed … Rollback to 6 9 … failed … Release "hello" failed: context deadline exceeded
The second “rollback” republished the failed bad-tag config. Conclusion: always write out the target revision Fix: helm rollback hello 8 -n demo --wait.
helm rollback hello 8 -n demo --wait helm uninstall hello -n demo --keep-history --wait helm list -n demo; helm list -n demo --uninstalled kubectl -n demo get deploy,svc; kubectl -n demo get secret -l name=hello,owner=helm | tail -3
release "hello" uninstalled NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION hello demo 10 … uninstalled podinfo-6.17.0 6.17.0 No resources found in demo namespace. sh.helm.release.v1.hello.v8 helm.sh/release.v1 1 … sh.helm.release.v1.hello.v9 helm.sh/release.v1 1 … sh.helm.release.v1.hello.v10 helm.sh/release.v1 1 …
Default helm list hello is no longer visible; the objects are deleted, but the records remain (subject to history-max, so the earliest revisions may already have been cleaned up).
helm rollback hello 8 -n demo --wait helm list -n demo; kubectl -n demo get deploy
Rollback was a success! Happy Helming! NAME NAMESPACE REVISION … STATUS CHART hello demo 11 … deployed podinfo-6.17.0 NAME READY UP-TO-DATE AVAILABLE AGE hello-podinfo 2/2 2 2 20s
uninstall --keep-history No new revision is added; instead, the latest revision 10 is marked as uninstalled; rolling back to the last good revision 8 produces revision 11 and recreates all objects.
helm uninstall hello -n demo --wait kubectl -n demo get secret -l owner=helm helm uninstall hello -n demo --ignore-not-found; echo "exit=$?"
release "hello" uninstalled No resources found in demo namespace. exit=0
Case 1: after rollback, the database reports “unknown column”
Problem: The pre-upgrade hook of v2.0 ran a database migration (dropping old columns). After the bug was found, the release was rolled back helm rollback to v1.9, and the old code accessed the deleted columns, so the outage grew. Approach: Adopt an “expand–contract” migration: the new version only adds columns and never drops them; once both versions are compatible, drop the old columns in a later release. If something goes wrong, roll forward with a fixed version. Limitation: Helm cannot see database state; migrations run in hooks are not undone by rollback.
Case 2: reinstall fails after uninstall — orphan PVCs and keep objects
Problem: After uninstalling the Redis release, a same-named reinstall reused the old PVC in the new StatefulSet, bringing the old data and old password along, so authentication failed; another helm.sh/resource-policy: keep Secret caused a “resource already exists” error. Approach: Make the uninstall procedure a checklist: helm uninstall → confirm whether the data should be kept → kubectl delete pvc -l app.kubernetes.io/instance=redis → clean up keep objects, or when reinstalling, use --take-ownership to adopt the keep objects. Limitation: Deleting a PVC deletes the underlying volume according to the StorageClass reclaimPolicy, so back up first.
Case 3: 3000 release Secrets piled up in a namespace
Problem: A team's CI ran upgrade on every commit and set --history-max 0, and a few months later helm upgrade upgrades were getting slower and slower, and etcd capacity alerts fired. Approach: Switch to --history-max 10, so the next upgrade automatically prunes old records; monitor kubectl get secret -A -l owner=helm --no-headers | wc -l. Limitation: After cleanup you cannot roll back to a deleted revision; longer audit trails should be kept by the CI/GitOps system.
Common errors and fixes
Error: release has no 12 version
Cause: the target revision does not exist: the number was mistyped, or it was already --history-max pruned.
helm history NAME -n NS
Error: release: not found (rollback / status / uninstall)
Cause: the wrong namespace, an inconsistent storage driver, or the release has already been uninstalled (without keeping history).
helm list -A -a | grep NAME HELM_DRIVER=configmap helm list -A -a
Fix: A fully uninstalled release cannot be rolled back; it can only be reinstalled (if you have a values backup). In cleanup scripts use uninstall --ignore-not-found.
Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress
Cause: the latest revision is in pending-*: either there are truly concurrent operations, or the previous process was interrupted.
helm history NAME -n NS --max 3 kubectl get secret -n NS -l name=NAME,owner=helm,status=pending-upgrade
Fix: after confirming there are no concurrent operations, run helm rollback NAME <last deployed>; see the Module 8 troubleshooting tree and Lesson 7.
uninstall leaves PVCs / Secrets / the namespace itself behind
Cause: StatefulSet PVCs are not in the release manifest; resource-policy: keep objects with keep were deliberately retained; the namespace itself does not belong to the release.
kubectl get pvc,secret,cm -n NS -l app.kubernetes.io/instance=NAME kubectl get all,cm,secret -n NS -o json | jq -r '.items[] | select(.metadata.annotations["helm.sh/resource-policy"]=="keep") | .kind+"/"+.metadata.name'
uninstall never returns / objects stuck in Terminating
Cause: using --wait and objects with finalizers (e.g. the PVC's kubernetes.io/pvc-protection still in use by a Pod; cloud resource cleanup for a LoadBalancer Service; custom Operator finalizers).
kubectl get all -n NS
kubectl get pvc PVC -o jsonpath='{.metadata.finalizers}'
Fix: find and resolve the finalizer dependencies; do not blindly delete finalizers, as this may leak cloud resources.
1. Roll back release api to revision 14, wait until ready, clean up the objects created by this run if it fails, and record ticket number CHG-1234.
helm rollback api 14 -n prod --wait --timeout 10m --cleanup-on-fail --description "CHG-1234 rollback to 14"
2. Uninstall release redis but keep its history, then list all uninstalled releases that still have retained history.
helm uninstall redis -n myapp --keep-history helm list -A --uninstalled
The release of revision 21 failed at dawn (status failed), and the on-call colleague ran helm rollback api, yet the service is still abnormal. Explain what happened and write out the correct handling steps.
helm rollback api Without a number, the target is “current − 1”. If the current latest is 21 (failed), the target is 20, which is usually a good one. But if someone already rolled back once (the latest is now 22 = Rollback to 20), running another no-number rollback targets 21, the failed config. Correct steps: helm history api find the last revision whose status is deployed/superseded and whose description is normal → helm rollback api <that number> --wait → helm get values api and kubectl rollout status verify → review the cause of the failure, and after fixing it, release a new version.
Verified teaching videos
No verified video dedicated to the release state machine and --keep-history was found; a storyboard script is provided instead.
Official documentation
Video storyboard script (about 80 seconds)
Visual: a row of revision cards v1–v3; v3 turns red and reads failed.
Narration: The upgrade failed, but the failed record does not disappear; it stays in the history.
Visual: the v2 card is copied and pasted on the far right to become v4, titled Rollback to 2.
Narration: Rollback is not rewinding a tape. It copies the chart and values of the old version and publishes them again as a new revision.
Visual: a rollback command without a number; an arrow points to “current minus one”, landing exactly on the red v3, with a warning icon flashing.
Narration: If you don't specify the target version, Helm goes back to current minus one. That may be the very failed version. Always write out the target number.
Visual: an uninstall broom sweeps away the Pods and Service, but --keep-history leaves the stack of cards behind; the PVC and namespace are still there.
Narration: Uninstall deletes objects and records. Adding keep-history keeps the records, so you can audit them and bring them back.
Module 6 · OCI repositories and chart distribution
- Use
helm package→helm push→helm pull/install oci://to complete one full distribution and explain the reference rules (when pushing, do not write the chart name and tag; when pulling or installing, write the chart name). - Explain the OCI artifact structure of a Helm chart: manifest + config (
application/vnd.cncf.helm.config.v1+json) + chart content layer (…chart.content.v1.tar+gzip) + optional provenance layer. - Pin the chart by digest (
@sha256:…), understand the risk of tags being overwritten, and be able to log in to ACR, ECR, GHCR and Docker Hub.
What: a chart as an OCI artifact
The OCI (Open Container Initiative) distribution spec defines the HTTP API of image registries. It can store not only container images but also arbitrary “artifacts”. Helm pushes a .tgz chart package as one OCI manifest:
| Composition | Media type | Content |
|---|---|---|
| manifest | application/vnd.oci.image.manifest.v1+json | references the config and layers below, with org.opencontainers.image.* annotations (from Chart.yaml: title, version, description, source…) |
| config | application/vnd.cncf.helm.config.v1+json | JSON of the Chart.yaml metadata |
| chart layer | application/vnd.cncf.helm.chart.content.v1.tar+gzip | helm package the resulting .tgz as-is |
| provenance layer (optional) | application/vnd.cncf.helm.chart.provenance.v1.prov | If a .prov signature file is in the same directory, it is uploaded automatically. |
Real example (verified 2026-11): ghcr.io/stefanprodan/charts/podinfo:6.17.0 manifest contains a 350-byte Helm config and an approximately 18 KB chart layer; the manifest digest is sha256:258d0da545724b4eea8de5d5e724cd9a75aab3de79a87ba8d82ec402745cea58; the same repository also has sha256-….sig tag, which is the cosign signature.
How: reference rules
| Operation | Syntax | Notes |
|---|---|---|
| Log in | helm registry login HOST | Helm 4 only accepts a hostname (a port is allowed),do not include oci:// or a path. Credentials are stored in $HELM_CONFIG_HOME/registry/config.json |
| Push | helm push mychart-0.2.0.tgz oci://HOST/NAMESPACE | Do not write the chart name or tag: repository path = NAMESPACE/mychart; tag = chart version (+ is replaced by _, since OCI tags do not allow +) |
| Pull / inspect | helm pull|show|template oci://HOST/NAMESPACE/mychart --version 0.2.0 | the chart name is required; --version version constraints are also allowed (Helm lists the tags to resolve them). |
| Install / upgrade | helm upgrade -i web oci://HOST/NAMESPACE/mychart --version 0.2.0 | Same as above |
| By digest | helm install web oci://HOST/NAMESPACE/mychart@sha256:<digest> | Supported in Helm 4; installation is refused if the content does not match the digest |
| As a dependency | Chart.yaml: repository: "oci://HOST/NAMESPACE" | no chart name; helm dependency update pulled by <repository>/<name>:<version> |
Why: why pin by digest
OCI tags are mutable pointers: most registries allow the same tag to be pushed again (overwriting it). --version 0.2.0 Today and tomorrow you may get different content. The digest is the SHA-256 of the manifest content; if the content changes, the digest changes too, so @sha256:… digest is an immutable reference. Combined with the registry's “tag immutability” setting (ACR's lock, ECR's tag immutability, Harbor's immutable rules) and cosign signature verification (Lesson 4), it forms the foundation of the chart supply chain.
Login methods for common registries
| Registry | Login | Notes |
|---|---|---|
| Azure Container Registry | az acr login -n myacr --expose-token --output tsv --query accessToken | helm registry login myacr.azurecr.io --username 00000000-0000-0000-0000-000000000000 --password-stdin | The username is a fixed all-zeros GUID; the token expires in about 3 hours; in CI, prefer workload identity federation |
| Amazon ECR | aws ecr get-login-password --region ca-central-1 | helm registry login --username AWS --password-stdin 123456789012.dkr.ecr.ca-central-1.amazonaws.com | requires pre-creating a repository named the same as the chart (e.g. charts/mychart); the token lasts 12 hours |
| GitHub Container Registry | echo $GITHUB_TOKEN | helm registry login ghcr.io -u USER --password-stdin | Newly pushed packages are private by default; change them to public in the GitHub package settings. |
| Docker Hub | helm registry login registry-1.docker.io -u USER | Anonymous pulls are rate-limited; public charts such as oci://registry-1.docker.io/cloudpirates/redis |
When: HTTP repository or OCI?
- New projects and internal enterprise use: use OCI— reuse the existing image registry's authentication, RBAC, replication, vulnerability scanning and retention policies; no need to maintain index.yaml.
- Need
helm search repoa browsable experience or to serve many older clients: keep providing an HTTP repository (many projects publish both in parallel). - Offline / air-gapped environments:
helm pullget the .tgz, or useoras/crane/skopeoto copy the OCI artifact to the internal registry (the digest stays unchanged).
oci://host/charts/mychart” — it pushes to charts/mychart/mychart. ② “OCI charts also need helm repo add” — neither needed nor supported. ③ “--version 0.2.0 is immutable” — tags can be overwritten; only the digest is immutable. ④ “helm registry login oci://myacr.azurecr.io” — Helm 4 only accepts a hostname. ⑤ “The chart's digest equals the sha256 of the .tgz” —@sha256: actually refers to manifest the manifest's digest, not the digest of the chart layer.Structure diagram: what a chart looks like in an OCI repository
Flow diagram: from CI to cluster
Interactive simulator: tag drift vs digest pinning
Click the actions in order. On the left is the repository's charts/mychart tag and manifest; on the right are two environments: staging installs by tag, prod installs by digest. See what happens when “someone re-pushes with the same version number”.
Core commands and flags
| Command | Purpose | Key flags |
|---|---|---|
helm registry login HOST | Log in to an OCI registry | -u,--password-stdin,--plain-http,--insecure,--ca-file/--cert-file/--key-file |
helm registry logout HOST | Delete saved credentials | — |
helm push CHART.tgz oci://HOST/NS | Push a chart | --plain-http,--insecure-skip-tls-verify,--username/--password |
helm pull oci://HOST/NS/CHART | Pull the .tgz | --version,--untar,-d; you can also …/CHART@sha256:… |
helm show all oci://… | view it without installing | --version |
helm install/upgrade … oci://… | deploy directly from the repository | --version or @sha256:,--plain-http |
# public OCI chart: no login required helm show chart oci://ghcr.io/stefanprodan/charts/podinfo --version 6.17.0 | grep -E '^(name|version)' helm pull oci://ghcr.io/stefanprodan/charts/podinfo --version 6.17.0
Pulled: ghcr.io/stefanprodan/charts/podinfo:6.17.0 Digest: sha256:258d0da545724b4eea8de5d5e724cd9a75aab3de79a87ba8d82ec402745cea58 name: podinfo version: 6.17.0
# install by digest (fails if the content does not match the digest) helm upgrade --install hello oci://ghcr.io/stefanprodan/charts/podinfo@sha256:258d0da545724b4eea8de5d5e724cd9a75aab3de79a87ba8d82ec402745cea58 \ -n demo --wait helm list -n demo
Release "hello" does not exist. Installing it now. Pulled: ghcr.io/stefanprodan/charts/podinfo@sha256:258d0da545724b4eea8de5d5e724cd9a75aab3de79a87ba8d82ec402745cea58 Digest: sha256:258d0da545724b4eea8de5d5e724cd9a75aab3de79a87ba8d82ec402745cea58 NAME: hello ... NAME NAMESPACE REVISION … STATUS CHART APP VERSION hello demo 1 … deployed podinfo-6.17.0 6.17.0
How to verify: You can also check the digest without Helm: crane digest ghcr.io/stefanprodan/charts/podinfo:6.17.0 or oras manifest fetch --descriptor …. Common mistakes: Mistaking Pulled: the “Digest” printed after the push for the digest of the chart layer. Production use: Record the chart digest in the GitOps repository, and combine it with tools such as Renovate to automatically open PRs for updates.
Lab 6: local OCI registry, authentication, push and digest pinning (about 7 minutes)
mkdir -p ~/helmlab/registry/auth && cd ~/helmlab/registry
docker run --rm --entrypoint htpasswd httpd:2 -Bbn lab 'Lab-Pass-2026' > auth/htpasswd
docker run -d --name helm-registry -p 127.0.0.1:5000:5000 \
-v "$PWD/auth:/auth" \
-e REGISTRY_AUTH=htpasswd -e REGISTRY_AUTH_HTPASSWD_REALM=lab \
-e REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd \
registry:3
curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:5000/v2/
401
401 means the registry requires authentication. The local registry has no TLS, so later commands need to add --plain-http——(lab only); production registries must use HTTPS.
echo 'Lab-Pass-2026' | helm registry login localhost:5000 -u lab --password-stdin --plain-http helm registry login oci://localhost:5000 -u lab --password-stdin --plain-http <<< 'x' 2>&1 | tail -1 # observe Helm 4 rejecting this
Login Succeeded Error: … (Helm 4 does not accept addresses with oci:// or a path)
cd ~/helmlab helm package mychart -d dist helm push dist/mychart-0.2.0.tgz oci://localhost:5000/charts --plain-http
Successfully packaged chart and saved it to: dist/mychart-0.2.0.tgz Pushed: localhost:5000/charts/mychart:0.2.0 Digest: sha256:9f3c2b7e…
AUTH='lab:Lab-Pass-2026'
curl -s -u "$AUTH" http://127.0.0.1:5000/v2/charts/mychart/tags/list; echo
DIGEST=$(curl -sI -u "$AUTH" -H 'Accept: application/vnd.oci.image.manifest.v1+json' \
http://127.0.0.1:5000/v2/charts/mychart/manifests/0.2.0 | awk -F': ' 'tolower($1)=="docker-content-digest"{print $2}' | tr -d '\r')
echo "$DIGEST"
curl -s -u "$AUTH" -H 'Accept: application/vnd.oci.image.manifest.v1+json' \
http://127.0.0.1:5000/v2/charts/mychart/manifests/0.2.0 | jq '{config: .config.mediaType, layers: [.layers[].mediaType]}'
{"name":"charts/mychart","tags":["0.2.0"]}
sha256:9f3c2b7e…
{
"config": "application/vnd.cncf.helm.config.v1+json",
"layers": [
"application/vnd.cncf.helm.chart.content.v1.tar+gzip"
]
}helm install pinned oci://localhost:5000/charts/mychart@$DIGEST -n demo --plain-http # without changing the version number, quietly change the content and re-push the same tag sed -i 's/^replicaCount: 1$/replicaCount: 2/' mychart/values.yaml helm package mychart -d dist && helm push dist/mychart-0.2.0.tgz oci://localhost:5000/charts --plain-http helm template x oci://localhost:5000/charts/mychart --version 0.2.0 --plain-http | grep 'replicas:' helm template x oci://localhost:5000/charts/mychart@$DIGEST --plain-http | grep 'replicas:'
Pushed: localhost:5000/charts/mychart:0.2.0 Digest: sha256:41d0a8c3… ← same tag, new digest replicas: 2 ← by tag: you get the overwritten new content replicas: 1 ← by digest: still the content that was originally reviewed
The local registry allows tags to be overwritten by default; the old manifest is still reachable by digest (until garbage collection). For production registries, enable tag immutability and use digests in deployments.
helm uninstall pinned -n demo sed -i 's/^replicaCount: 2$/replicaCount: 1/' mychart/values.yaml helm registry logout localhost:5000 docker rm -f helm-registry
If the capstone lab also wants to push the myapp chart to the local registry, you can keep the registry container.
Case 1: migrating from a GitHub Pages repository to ACR
Problem: The platform team hosted internal charts on GitHub Pages, which required managing access tokens separately, and index.yaml conflicts were frequent. Approach: In CI, run helm package and then push to the ACR helm/ namespace; the cluster pulls using Argo CD's OCI repository credentials (workload identity); ACR enables content trust or is combined with Notation/cosign signing. Configuration: ACR retention policies only clean up untagged manifests. Limitation: Developers can no longer helm search repo browse charts through a repository index, so a catalog must be provided on an internal portal (or a private Artifact Hub instance).
Case 2: the same version number overwritten, causing “ghost changes”
Problem: A hotfix was re-pushed using 0.8.3 the same tag. Staging and prod deployed the “same version” at different times but behaved differently, and it took two days to investigate. Approach: Enable tag immutability on the registry (ECR imageTagMutability=IMMUTABLE); record the digest in the deployment manifests; CI checks and fails if the version number already exists. Limitation: With tag immutability, a mistakenly pushed version can only be corrected by bumping the version number; it cannot be overwritten.
Case 3: chart sync for air-gapped environments
Problem: The production clusters of a financial customer have no internet access. Approach: In the DMZ, use crane copy/oras copy to copy the chart together with the images it references to the internal Harbor (digest unchanged), and change the image repository in values to the internal address. Limitation: Images hard-coded in the chart (not via values) must be rewritten with a post-renderer plugin (Lesson 4).
Common errors and fixes
Error: … 401 Unauthorized / unexpected status from HEAD request … 401
Cause: not logged in, token expired (ACR about 3 hours, ECR 12 hours), or the hostname you logged in to differs from the reference (e.g. logged in to docker.io but pulling from registry-1.docker.io).
cat ~/.config/helm/registry/config.json | jq '.auths | keys'
Fix: Log in again helm registry login to exactly the same hostname as the reference.
Error: … http: server gave HTTP response to HTTPS client
Cause: The registry is plain HTTP (lab environment), but Helm uses HTTPS by default.
Fix: In the lab, add --plain-http; configure TLS for production registries.
Error: … name unknown / repository does not exist (pushing to ECR)
Cause: ECR requires you to first create a repository matching the chart (NAMESPACE/CHART).
aws ecr create-repository --repository-name charts/mychart --region ca-central-1
After pushing, the path became charts/mychart/mychart
Cause:helm push target included the chart name. For push, the target should only go down to the namespace: oci://HOST/charts.
Error: digest mismatch / install by digest fails
Cause: a wrong digest was typed, the digest of the chart layer or config was copied instead of the manifest digest, or an image sync tool rewrote the manifest (for example, converting the media type).
Fix: Use crane digest/ the registry API's Docker-Content-Digest header to get the manifest digest; when syncing, use tools that keep the digest intact.
1. Push dist/shop-1.4.0.tgz to the ACR myacr.azurecr.io helm namespace, and write the command that installs it afterwards.
helm push dist/shop-1.4.0.tgz oci://myacr.azurecr.io/helm helm upgrade --install shop oci://myacr.azurecr.io/helm/shop --version 1.4.0 -n shop
2. Download the cloudpirates redis chart 0.39.1 and unpack it into the ./vendor directory.
helm pull oci://registry-1.docker.io/cloudpirates/redis --version 0.39.1 --untar --untardir vendor
The security team requires “the chart deployed to production must be exactly identical to the one scanned in CI”. Design a plan from build to deployment.
CI: helm lint/template → helm package → push to the repository (tag immutability enabled) → get the manifest digest from the push output or the registry API → sign the digest with cosign → write the digest into the deployment repository (GitOps values / Application). Deploy: helm upgrade -i … oci://…/chart@sha256:…, reference the digest in Argo CD / Flux as well, and verify the signature at admission or through Flux's OCI verification. This way, even if someone overwrites the tag, production is unaffected; Helm 4 refuses to install when the content does not match.
Verified teaching videos
No verified video dedicated to Helm OCI distribution and digest pinning (checked via oEmbed) was found. For the Helm introductory videos, see those listed in Module 1; for the OCI part, this lesson and the official documentation take precedence.
Official documentation
- Use OCI-based registries(the official page notes it has not been fully updated for Helm 4)
- helm push
- helm registry login
- ACR: storing Helm charts
- ECR: pushing Helm charts
Video storyboard script (about 80 seconds)
Visual: a .tgz file is packed into a shipping container labeled “config + chart layer”, which is lifted into an image registry.
Narration: A chart can also be stored in an image registry. Helm wraps it as an OCI artifact: one manifest, one config, one chart layer.
Visual: the command helm push mychart-0.2.0.tgz oci://host/charts, and the tag 0.2.0 appears automatically.
Narration: When pushing, you only specify the namespace; the chart name and version automatically become the repository path and tag.
Visual: the arrow for tag 0.2.0 moves from the old block to the new block; beside it, the sha256 lock is still locked onto the old block.
Narration: Tags can be overwritten, digests cannot. For production deployments, write the digest, so you deploy exactly the version you reviewed.
Visual: icons for ACR, ECR, GHCR and Docker Hub, each with a registry login command.
Narration: Log in with the hostname only. Every cloud's tokens expire, so in CI use federated identity to obtain short-lived tokens.
Module 7 · helm template, get and diff
- Use
helm templateto render and review manifests locally, and master--show-only,--output-dir,--kube-version,--api-versions,--dry-run=server, and know that--validateis deprecated in Helm 4. - Use
helm get manifest/values/notes/hooks/metadata/allto read release records, distinguishing between “recorded manifests” and “live objects in the cluster”. - Under Helm 4's plugin verification mechanism, install helm-diff and use
helm diff upgrade/revision/rollbackfor change review.
What: three ways to “look at manifests”
| Command | Data source | Requires cluster? | Question it answers |
|---|---|---|---|
helm template | chart + values, rendered locally | Not required by default (--dry-run=client); required when --dry-run=server is used. | “What would this set of values render?” |
helm get … | release record stored in the release Secret | Required (reads the Secret) | “What was actually used in the Nth release?” |
helm diff … (plugin) | release record vs newly rendered result (optionally a three-way merge comparing with live objects) | Required | “What will this upgrade change?” |
kubectl get/diff | live objects in the cluster | Required | “What is in the cluster right now?” |
How: details of helm template
- When no release name is given,
release-nameis used;-nonly affects.Release.Namespace. - Does not connect to the cluster by default:
.Capabilities.KubeVersionand.Capabilities.APIVersionsuse Helm's built-in defaults; if the chart depends on them (such asif .Capabilities.APIVersions.Has "monitoring.coreos.com/v1"), use--kube-version 1.37.0and-a monitoring.coreos.com/v1to simulate;lookupfunctions return empty. --dry-run=server: connects to the cluster to get the real Capabilities, so thatlookuptakes effect, and validates manifests against the cluster's OpenAPI. In Helm 4,--validateis marked deprecated (hintinguse '--dry-run=server' instead); the two are mutually exclusive.- Common parameters:
-s/--show-only templates/deployment.yaml(may be repeated),--output-dir out/(written separately per template file),--include-crds,--skip-tests,--is-upgrade(so that.Release.IsUpgradeis true). - Each object in the output is preceded by
# Source: mychart/templates/xxx.yamlcomments, which make it easier to locate the template file; hooks are also output (with annotations).
How: subcommands of helm get
| Subcommand | Output |
|---|---|
helm get manifest | The manifest rendered for this revision (without hooks). This is what Helm compares against on the next upgrade |
helm get values [--all] | user-supplied / all computed values (Module 4) |
helm get notes | rendered NOTES.txt |
helm get hooks | hook object manifests (Lesson 6) |
helm get metadata | name, chart, version, appVersion, namespace, revision, status, deployment time, etc. (-o json) |
helm get all | all of the above; --template can be extracted with a Go template |
All subcommands support --revision N. Record ≠ live: someone kubectl edit had modified the objects,helm get manifest cannot be seen; to compare live state, use helm get manifest NAME | kubectl diff -f -, or helm-diff's --three-way-merge.
How: helm-diff and the Helm 4 plugin system
- helm-diff (databus23/helm-diff) is the most commonly used Helm plugin, released 2026-09-26 as v3.15.15, its README states it requires Helm 3.18+ and provides Helm 4 installation instructions.
- Helm 4's
helm plugin installdefault--verify=true: installing from a Git repository URL cannot be verified, so it reportsplugin source does not support verification. Use --verify=false to skip verification. Two approaches: ① (recommended) import the author's GPG public key, then install from the release tarball URL ; Helm verifies the.provsignature. ② If you explicitly accept the risk, use--verify=false. Installing from a local directory is treated as development mode and not verified. - Common subcommands:
helm diff upgrade NAME CHART [flags](flags are mostly the same as helm upgrade),helm diff revision NAME 3 5,helm diff rollback NAME 3,helm diff release A B. - Comparison baseline: by default, the manifest in the release record vs
helm templatethe new rendering;--three-way-mergeincluding live objects too can detect cluster drift;--server-sidethe parameter matches Helm 4's SSA semantics (default auto);--dry-run=servermakes lookup take effect;-C 3controls the number of context lines;--suppress-secretshides Secret content (Secrets are redacted by default; confirm for your version).
When: recommended release review workflow
- PR stage:
helm lint+helm template(if needed,--kube-version) + kubeconform and other schema validation (Lesson 3). - Before release:
helm diff upgrade … -f values-prod.yaml, paste the output into the change ticket; for prod, add--three-way-mergeto detect manual drift. - After release:
helm get manifest/helm historyas an audit record; when problems occur,helm diff revisionprecisely compare two releases.
--dry-run=server. ④ “Under Helm 4, keep running helm plugin install https://github.com/...” — by default it fails because it cannot be verified. ⑤ “If diff shows no output, it is absolutely safe” — diff cannot see changes in the content behind an image tag, side effects of hooks, or external dependencies.Comparison diagram: four data sources
Flow diagram: verification when Helm 4 installs a plugin
pkg/cmd/plugin_install.go in the Helm source.Interactive: change values → render live → compare with the deployed revision
This is a simplified helm create-style template (Deployment + Service). Edit the values on the left; the middle shows the output of helm template , and the right side shows the diff against the “deployed revision” (similar to helm diff upgrade). Click “Publish as new revision” to set the current result as the new baseline.
Core commands and flags
# Render locally and only look at the Service helm template web ./mychart -s templates/service.yaml # Split by template into a directory, for easy handling with git diff / kubeconform helm template web ./mychart -f values-prod.yaml --output-dir out/ # Simulate the target cluster's version and APIs helm template web ./mychart --kube-version 1.37.0 -a monitoring.coreos.com/v1 # Helm 4: replaces --validate helm template web ./mychart --dry-run=server
---
# Source: mychart/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
name: web-mychart
labels:
helm.sh/chart: mychart-0.2.0
app.kubernetes.io/name: mychart
app.kubernetes.io/instance: web
app.kubernetes.io/version: "1.16.0"
app.kubernetes.io/managed-by: Helm
spec:
type: ClusterIP
ports:
- port: 80
targetPort: http
protocol: TCP
name: http
selector:
app.kubernetes.io/name: mychart
app.kubernetes.io/instance: web
helm template web ./mychart --validate 2>&1 | head -1
Flag --validate has been deprecated, use '--dry-run=server' instead
# Read the release record
helm get metadata hello -n demo
helm get manifest hello -n demo | grep -E '^(kind| name):'
helm get all hello -n demo --template '{{.Release.Name}} rev={{.Release.Version}} chart={{.Release.Chart.Metadata.Version}}'
NAME: hello CHART: podinfo VERSION: 6.17.0 APP_VERSION: 6.17.0 NAMESPACE: demo REVISION: 1 STATUS: deployed DEPLOYED_AT: 2026-11-15T10:45:02Z kind: Service name: hello-podinfo kind: Deployment name: hello-podinfo hello rev=1 chart=6.17.0
helm get metadata Fields in --template depend on your Helm version's actual output; field names usable in templates come from the release object (Go struct).
helm-diff (the recommended way to verify installation in Helm 4, from the project README)
curl -sL https://github.com/databus23.gpg | gpg --import
gpg --list-keys --with-fingerprint EA17A2A206AFF8CD
# expected fingerprint: C5645EF4 7482257A 1F806D2B EA17A2A2 06AFF8CD
OS_NAME=$(uname -s | tr '[:upper:]' '[:lower:]' | sed 's/darwin/macos/')
ARCH=$(uname -m | sed -e 's/x86_64/amd64/' -e 's/aarch64/arm64/')
helm plugin install https://github.com/databus23/helm-diff/releases/latest/download/helm-diff-${OS_NAME}-${ARCH}.tgz
helm plugin list
Signed by: … Using Key With Fingerprint: C5645EF47482257A1F806D2BEA17A2A206AFF8CD Plugin Hash Verified: sha256:… Installed plugin: diff NAME VERSION DESCRIPTION diff 3.15.15 Preview helm upgrade changes as a diff
# Comparison: behavior of installing from a Git URL under Helm 4 helm plugin install https://github.com/databus23/helm-diff 2>&1 | tail -1
Error: plugin source does not support verification. Use --verify=false to skip verification
| helm-diff command | Purpose |
|---|---|
helm diff upgrade NAME CHART -f v.yaml | Upgrade preview (same values flags as helm upgrade) |
helm diff upgrade … --three-way-merge | Include live objects, to detect manual drift |
helm diff revision NAME 3 5 | Compare two historical revisions |
helm diff rollback NAME 3 | Preview the changes for rolling back to revision 3 |
-C 3 / --detailed-exitcode | Context lines / exit code is 2 when there are differences (use in CI to decide “is there a change”) |
Lab 7: diff before upgrade, detect drift, get after upgrade (about 7 minutes)
helm plugin install https://github.com/databus23/helm-diff --verify=false).
helm diff version
3.15.15
helm diff upgrade hello podinfo/podinfo --version 6.17.0 -n demo --set replicaCount=2 -C 2
demo, hello-podinfo, Deployment (apps) has changed:
# Source: podinfo/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
…
spec:
- replicas: 1
+ replicas: 2
revisionHistoryLimit: 10
The same chart version can be installed from OCI (by digest) and then upgraded from an HTTP repository. A release only cares about chart content and values, not their source.
kubectl -n demo set env deploy/hello-podinfo DEBUG=true helm diff upgrade hello podinfo/podinfo --version 6.17.0 -n demo -C 1 echo "---- with --three-way-merge ----" helm diff upgrade hello podinfo/podinfo --version 6.17.0 -n demo -C 1 --three-way-merge
---- with --three-way-merge ---- demo, hello-podinfo, Deployment (apps) has changed: … - - name: DEBUG - value: "true"
The first command produces no output: the record and the new rendering are identical, so the two-way diff cannot see the kubectl set env changes; the three-way merge includes live objects and shows that this upgrade will remove DEBUG (whether it is actually removed also depends on SSA field ownership: the field belongs to kubectl-set manager, and when Helm does not own it, it is not deleted. This is exactly where diff tools and SSA semantics need to be read side by side).
helm get manifest hello -n demo | kubectl diff -f - | head -20
diff -u -N /tmp/LIVE-…/apps.v1.Deployment.demo.hello-podinfo /tmp/MERGED-…/apps.v1.Deployment.demo.hello-podinfo … - - name: DEBUG - value: "true"
kubectl -n demo set env deploy/hello-podinfo DEBUG- # undo the drift helm upgrade hello podinfo/podinfo --version 6.17.0 -n demo --set replicaCount=2 --wait helm diff revision hello 1 2 -n demo -C 0 helm get values hello -n demo --revision 2 helm get notes hello -n demo | head -3
demo, hello-podinfo, Deployment (apps) has changed: - replicas: 1 + replicas: 2 USER-SUPPLIED VALUES: replicaCount: 2 NOTES: 1. Get the application URL by running these commands: echo "Visit http://127.0.0.1:8080 to use your application"
helm uninstall hello -n demo.Case 1: attaching helm diff to change review
Problem: Every release must go through CAB review, and approvers cannot tell what “the chart going from 1.8 to 1.9” means. Approach: CI runs helm diff upgrade --detailed-exitcode -f envs/prod.yaml for each environment and posts the output as a PR comment; exit code 0 means no change and the deployment can be skipped, 2 means a change that needs approval. Limitation: diff requires read access to the cluster (reading the release Secret), so the CI identity needs Secret read permission; confirm that Secret contents are redacted.
Case 2: feeding helm template output into GitOps
Problem: The security team does not allow a template engine to run inside the cluster, and requires the “final manifests” to be stored in Git. Approach: In CI, run helm template --kube-version 1.37.0 -a … and render to rendered/ directory, commit it, and Argo CD syncs plain YAML (“rendered manifests” mode). Limitation: Loses Helm's release semantics (history, rollback, and hook execution order is interpreted by Argo CD); charts that depend on lookup cannot be rendered correctly.
Case 3: plugin installation fails in CI after upgrading to Helm 4
Problem: After the CI image was upgraded to Helm 4,helm plugin install https://github.com/databus23/helm-diff reports “plugin source does not support verification”, and all pipelines failed. Approach: During the image build stage, import the GPG public key and install from the release tarball (pin a version, such as diff-3.15.15-linux-amd64.tgz + .prov), and bake the plugin into the CI image. Limitation: When installing offline, Helm 4 derives the directory name from the tarball file name, so the official file name must be kept.
Common errors and fixes
Error: plugin source does not support verification. Use --verify=false to skip verification
Cause: Helm 4 verifies plugin signatures by default, but a Git repository URL cannot provide provenance.
Fix: Switch to a .prov release tarball URL and import the public key; or, after careful evaluation, --verify=false.
Error: template: mychart/templates/deployment.yaml:23:20: executing "mychart/templates/deployment.yaml" at <.Values.image.tag>: nil pointer evaluating interface {}.tag
Cause: the values are missing a parent key (for example, by using --set image=null to delete the entire image, or an override file wrote image as a string).
helm template x ./mychart -f v.yaml --debug 2>&1 | head helm get values NAME --all | grep -A3 '^image'
Fix: fill in the values; chart authors can use (.Values.image).tag or dig defensively (Lesson 2).
Error: YAML parse error on mychart/templates/configmap.yaml: error converting YAML to JSON: yaml: line 7: mapping values are not allowed in this context
Cause: the rendered YAML has wrong indentation, or a value containing a colon was not quoted.
helm template x ./mychart --debug -s templates/configmap.yaml
Fix:--debug prints the rendered content when an error occurs, so check nindent values and | quote.
helm template output does not match the live deployment (e.g. ServiceMonitor is missing)
Cause: the chart uses .Capabilities.APIVersions or lookup to decide whether to render; offline template uses default values.
Fix:-a monitoring.coreos.com/v1,--kube-version, or --dry-run=server.
Error: if any flags in the group [validate dry-run] are set none of the others can be; [dry-run validate] were all set
Cause:--validate and --dry-run are mutually exclusive.
Fix: Use only --dry-run=server.
1. Render only deployment.yaml in ./mychart, simulate Kubernetes 1.37.0, and assume the cluster has Gateway API (gateway.networking.k8s.io/v1).
helm template web ./mychart -s templates/deployment.yaml --kube-version 1.37.0 -a gateway.networking.k8s.io/v1
2. Compare the manifest differences between revision 7 and revision 9 of release api, and export the user values of revision 9 to a file.
helm diff revision api 7 9 -n prod helm get values api -n prod --revision 9 -o yaml > api-rev9-values.yaml
You suspect someone manually edited a Deployment in production, but helm diff upgrade (with no flags) shows no changes. Why? How would you confirm it and handle it?
By default, diff compares the manifest in the release record with the new rendering. Since the two are the same, there is no output; the manual change exists only in the live objects. To confirm: helm diff upgrade … --three-way-merge or helm get manifest NAME | kubectl diff -f -, then use kubectl get deploy X --show-managed-fields -o yaml to see which manager (e.g. kubectl-edit) owns the changed fields. Handling: confirm whether the change should be kept; if so, write it back into values and release; if not, redeploy with Helm (for SSA conflicts, --force-conflicts), and tighten production write permissions.
Verified teaching videos
No verified video explaining helm-diff and Helm 4 plugin verification was found.
Official documentation
- helm template
- helm get
- helm plugin install
- databus23/helm-diff (README includes Helm 4 installation instructions)
Video storyboard script (about 80 seconds)
Visual: three picture frames: a blueprint (template), an archive photo (get), and a scene photo (kubectl get).
Narration: Template rendering is the blueprint, the release record is the archive photo, and the objects in the cluster are the scene. The three are not necessarily the same.
Visual: --validate is crossed out and replaced with --dry-run=server, with a line connecting to the cluster.
Narration: In Helm 4, the validate flag of template is deprecated; dry-run=server connects to the cluster to validate instead.
Visual: in the diff output, a red minus for replicas 1 and a green plus for replicas 2; the second frame adds a third column “live”, and a line DEBUG pops out.
Narration: helm diff shows what the upgrade will change; with three-way-merge, you can also find where someone edited manually.
Visual: a plugin package sealed with a signature stamp; Helm checks the fingerprint and lets it through; a Git link without a stamp is blocked.
Narration: Helm 4 verifies plugin signatures by default. Install from a signed release package, not directly from a Git address.
Module 8 · deploying myapp and an introduction to troubleshooting
- Use a community OCI chart (pinned by version and digest) to deploy Redis, and read the StatefulSet, Service, Secret and PVC it creates.
- Reshape the
helm createscaffold into the myapp chart: image, port, probes, environment variables (includingsecretKeyRef), and resources. - Identify and fix 5 common errors: name already in use, operation in progress (pending), rendering errors, a resource that already exists but does not belong to this release, and wait timeouts; use the troubleshooting tree to locate them by symptom.
What: what this module builds
| release | chart | Source | Main objects |
|---|---|---|---|
myapp/redis | redis 0.39.1 (appVersion 8.10.2) | oci://registry-1.docker.io/cloudpirates/redis, digest sha256:423b2ec1…9dc4 | StatefulSet redis, Service redis, headless Service, Secret redis (key redis-password), PVC data-redis-0 |
myapp/myapp | myapp 0.1.0 (appVersion 1.0) | Local helm create myapp reshape of the helm create scaffold | Deployment, Service, ServiceAccount (HPA/Ingress/HTTPRoute disabled by default) |
How: why this Redis chart, and its key values
- On Artifact Hub, Bitnami redis still has the most stars, but its free image policy has changed since 2025-08 (see Module 0); CloudPirates redis is a “verified publisher” and uses official
redisimages (pinned in values withtag@sha256), and the chart depends on acommonlibrary chart (Chart.lockfromoci://registry-1.docker.io/cloudpirates). - Key values (from the chart 0.39.1 values.yaml):
architecture: standalone(default; also supportsreplication,cluster),auth.enabled: true,auth.password: ""(when empty, a random password is generated; the template useslookupto read the existing Secret so it stays unchanged on upgrade),auth.existingSecret,persistence.enabled: true,persistence.size: 8Gi. - Naming: the template's fullname rule is the same as helm create's. When the release name contains the chart name, the release name is used directly. The release is named
redis, so the Service, Secret and StatefulSet are all namedredis, and myapp usesREDIS_HOST=redisas is.
How: reshaping the helm create scaffold into the myapp chart
| Requirement | Current state of the scaffold | How to change |
|---|---|---|
| Image myapp:1.0 | image.repository: nginx, use appVersion when the tag is empty | values: image.repository: myapp; Chart.yaml: appVersion: "1.0" |
| Listens on 5000 | containerPort taken from service.port (80) | values: service.port: 5000 |
| Probes /healthz | liveness/readiness both use GET / | Change the path in values |
| environment variables + Secret reference | scaffold has no env entry point | In the container in deployment.yaml, add the {{- with .Values.env }} block. |
| resources | resources: {} | set requests/limits in values |
When: overview of 5 common errors
| # | Error keyword | Root cause | First diagnostic command |
|---|---|---|---|
| 1 | cannot reuse a name that is still in use (Helm 3: written as re-use) | a release with the same name already exists in the same namespace (including failed ones, or uninstalled ones with history retained) | helm list -n NS -a |
| 2 | another operation (install/upgrade/rollback) is in progress | the latest revision is pending-*: a concurrent operation or an interrupted process | helm history NAME -n NS |
| 3 | parse error / execution error / YAML parse error / schema validation failed | template syntax, missing values, indentation, type | helm template … --debug |
| 4 | exists and cannot be imported into the current release: invalid ownership metadata | an object with the same name already exists but does not belong to this release | kubectl get KIND NAME -o yaml | grep -A3 annotations |
| 5 | context deadline exceeded / resource not ready | image, probe, scheduling, PVC or configuration errors cause kstatus to not reach Current | kubectl get pods,events |
helm rollback; deleting the record is a last resort. ③ “If the resource already exists, just add --take-ownership” — first confirm that the object really should be managed by this release; otherwise, uninstall will delete someone else's object too. ④ “The Redis password can be written into myapp's values” — instead, reference secretKeyRef the Secret generated by the Redis chart, so the password does not end up in myapp's release record.Deployment architecture: two releases, one namespace
Troubleshooting map: which stage the error appears in
Failure reproduction simulator
Choose a failure and step through: the error you will see → the diagnostic command and its output → the root cause → the fix and verification. Each failure can be reproduced for real in the last step of the “Lab” tab.
Core commands and flags
| Scenario | Command |
|---|---|
| Deploy Redis (pinned by digest) | helm upgrade -i redis oci://registry-1.docker.io/cloudpirates/redis@sha256:423b2ec1… -n myapp --create-namespace --set persistence.size=1Gi --wait |
| Generate chart scaffold | helm create myapp |
| Static check | helm lint ./myapp -f values-lab.yaml (--strict treat warnings as errors) |
| Render debugging | helm template myapp ./myapp -f values-lab.yaml --debug |
| Deploy / upgrade myapp | helm upgrade -i myapp ./myapp -n myapp -f values-lab.yaml --wait --rollback-on-failure |
| Overview of release resources | helm status myapp -n myapp --show-resources |
| Check lock status | helm list -n myapp --pending,kubectl get secret -n myapp -l owner=helm,status=pending-upgrade |
helm show values oci://registry-1.docker.io/cloudpirates/redis --version 0.39.1 | grep -nE '^architecture|^ enabled: true|^ size' helm status redis -n myapp --show-resources
38:architecture: standalone 110: enabled: true 280: enabled: true 286: size: 8Gi NAME: redis NAMESPACE: myapp STATUS: deployed REVISION: 1 RESOURCES: ==> v1/Secret NAME TYPE DATA AGE redis Opaque … 2m ==> v1/Service NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE redis ClusterIP 10.96.40.12 <none> 6379/TCP 2m redis-headless ClusterIP None <none> 6379/TCP 2m ==> v1/StatefulSet NAME READY AGE redis 1/1 2m
Note: The actual name of the headless Service and the number of Secret keys depend on the chart's rendered result (helm get manifest redis -n myapp | grep -E '^kind|^ name'). This chart has no NOTES.txt, so nothing is printed after installation. Production use:--show-resources is the fastest answer to “what exactly does this release manage”.
Lab 8: deploy Redis + myapp, then create and fix 5 types of errors (about 12 minutes)
helm upgrade --install redis \ oci://registry-1.docker.io/cloudpirates/redis@sha256:423b2ec14ca56bac26bf8ef429ed01e480eedeee0759fad2a71ef397b76f9dc4 \ -n myapp --create-namespace \ --set persistence.size=1Gi \ --wait --timeout 5m kubectl -n myapp get sts,svc,pvc,secret
Release "redis" does not exist. Installing it now. Pulled: registry-1.docker.io/cloudpirates/redis@sha256:423b2ec14ca56bac26bf8ef429ed01e480eedeee0759fad2a71ef397b76f9dc4 … STATUS: deployed REVISION: 1 NAME READY AGE statefulset.apps/redis 1/1 60s NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/redis ClusterIP 10.96.40.12 <none> 6379/TCP 60s … NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS persistentvolumeclaim/data-redis-0 Bound pvc-… 1Gi RWO standard NAME TYPE DATA AGE secret/redis Opaque … 60s secret/sh.helm.release.v1.redis.v1 helm.sh/release.v1 1 60s
The digest comes from the 2026-11-15 check against Docker Hub (corresponding to tag 0.39.1). If the chart publisher later deletes or re-pushes this version, switch to --version 0.39.1 and re-record the digest.
cd ~/helmlab
helm create myapp
sed -i 's/^appVersion: .*/appVersion: "1.0"/' myapp/Chart.yaml
# The scaffold has no env entry: insert an env block after imagePullPolicy
sed -i 's/^ imagePullPolicy: {{ .Values.image.pullPolicy }}$/&\n {{- with .Values.env }}\n env:\n {{- toYaml . | nindent 12 }}\n {{- end }}/' myapp/templates/deployment.yaml
grep -n -A4 'imagePullPolicy' myapp/templates/deployment.yaml
cat > values-lab.yaml <<'EOF'
image:
repository: myapp
pullPolicy: IfNotPresent
service:
port: 5000
livenessProbe:
httpGet: { path: /healthz, port: http }
readinessProbe:
httpGet: { path: /healthz, port: http }
env:
- name: REDIS_HOST
value: redis
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef: { name: redis, key: redis-password }
resources:
requests: { cpu: 50m, memory: 64Mi }
limits: { memory: 128Mi }
EOF
helm lint ./myapp -f values-lab.yaml
Creating myapp
42: imagePullPolicy: {{ .Values.image.pullPolicy }}
43- {{- with .Values.env }}
44- env:
45- {{- toYaml . | nindent 12 }}
46- {{- end }}
==> Linting ./myapp
[INFO] Chart.yaml: icon is recommended
1 chart(s) linted, 0 chart(s) failed
Line numbers depend on the actual file. Note that in the sed replacement string, & stands for “the entire matched line” (shown here as &; after copying, it is a single & character).
helm template myapp ./myapp -f values-lab.yaml -s templates/deployment.yaml | grep -E 'image:|containerPort|path:|name: REDIS' helm upgrade --install myapp ./myapp -n myapp -f values-lab.yaml --wait --timeout 3m --rollback-on-failure kubectl -n myapp port-forward svc/myapp 8080:5000 >/dev/null & sleep 2; curl -s localhost:8080; curl -s localhost:8080; kill %1
image: "myapp:1.0"
containerPort: 5000
path: /healthz
path: /healthz
- name: REDIS_HOST
- name: REDIS_PASSWORD
Release "myapp" does not exist. Installing it now.
NAME: myapp
NAMESPACE: myapp
STATUS: deployed
REVISION: 1
myapp v1.0 from myapp-7c9d8f6b5-k2xlp, hits=1
myapp v1.0 from myapp-7c9d8f6b5-k2xlp, hits=2helm upgrade myapp ./myapp -n myapp -f values-lab.yaml --set-string image.tag=1.1 --wait --rollback-on-failure helm history myapp -n myapp helm get values myapp -n myapp | grep -A2 '^image'
REVISION … STATUS CHART APP VERSION DESCRIPTION 1 … superseded myapp-0.1.0 1.0 Install complete 2 … deployed myapp-0.1.0 1.0 Upgrade complete image: pullPolicy: IfNotPresent repository: myapp
The APP VERSION column still shows 1.0 (from Chart.yaml), while the running image is 1.1. appVersion is just metadata. grep -A2 Only the first two lines are shown,tag: "1.1" is on the next line.
helm install myapp ./myapp -n myapp -f values-lab.yaml
Error: INSTALLATION FAILED: release name check failed: cannot reuse a name that is still in use
Fix: use helm upgrade --install (idempotent).
helm upgrade myapp ./myapp -n myapp -f values-lab.yaml --set-string image.tag=1.0 --wait --timeout 2m & sleep 3; kill -9 %1 helm history myapp -n myapp --max 2 helm upgrade myapp ./myapp -n myapp -f values-lab.yaml
REVISION … STATUS … DESCRIPTION 2 … deployed … Upgrade complete 3 … pending-upgrade … Preparing upgrade Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress
# Recovery: after confirming no other helm processes are running, roll back to the last successful revision pgrep -fa "helm upgrade myapp" || echo "no running helm" helm rollback myapp 2 -n myapp --wait helm history myapp -n myapp --max 3
no running helm Rollback was a success! Happy Helming! REVISION … STATUS … DESCRIPTION 2 … superseded … Upgrade complete 3 … pending-upgrade … Preparing upgrade 4 … deployed … Rollback to 2
The “current” revision that rollback reads is the latest record (pending 3), and it allows rolling back from the pending state. If the kill came too late and the upgrade had already completed, you will see revision 3 as deployed, and you can redo it. Revision 3's pending record is kept as history and no longer blocks later operations (the latest record is already 4). The description text follows the actual output.
helm template myapp ./myapp -f values-lab.yaml --set image=myapp:1.1 2>&1 | tail -2
printf '{{ .Values.missing.key }}\n' > myapp/templates/broken.yaml
helm template myapp ./myapp -f values-lab.yaml 2>&1 | tail -1
rm myapp/templates/broken.yaml
Error: template: myapp/templates/deployment.yaml:41:28: executing "myapp/templates/deployment.yaml" at <.Values.image.repository>: can't evaluate field repository in type interface {}
Error: template: myapp/templates/broken.yaml:1:17: executing "myapp/templates/broken.yaml" at <.Values.missing.key>: nil pointer evaluating interface {}.key
First: --set image=… a map was overwritten with a string; second: a nonexistent parent key was referenced. Rendering errors occur before any object is changed, so the cluster is unaffected.
kubectl -n myapp create configmap myapp-extra --from-literal=a=1 mkdir -p /tmp/extra/templates cat > /tmp/extra/Chart.yaml <<'EOF' apiVersion: v2 name: extra version: 0.1.0 EOF cat > /tmp/extra/templates/cm.yaml <<'EOF' apiVersion: v1 kind: ConfigMap metadata: name: myapp-extra data: a: "2" EOF helm install extra /tmp/extra -n myapp
Error: INSTALLATION FAILED: unable to continue with install: ConfigMap "myapp-extra" in namespace "myapp" exists and cannot be imported into the current release: invalid ownership metadata; label validation error: missing key "app.kubernetes.io/managed-by": must be set to "Helm"; annotation validation error: missing key "meta.helm.sh/release-name": must be set to "extra"; annotation validation error: missing key "meta.helm.sh/release-namespace": must be set to "myapp"
# Option A: confirm the object should be managed by extra → take ownership
helm install extra /tmp/extra -n myapp --take-ownership
kubectl -n myapp get cm myapp-extra -o jsonpath='{.metadata.labels}{"\n"}{.metadata.annotations}{"\n"}{.data}{"\n"}'
# Option B (equivalent manual approach): add the labels and annotations first, then install
# kubectl -n myapp label cm myapp-extra app.kubernetes.io/managed-by=Helm
# kubectl -n myapp annotate cm myapp-extra meta.helm.sh/release-name=extra meta.helm.sh/release-namespace=myapp
helm uninstall extra -n myapp
NAME: extra
STATUS: deployed
{"app.kubernetes.io/managed-by":"Helm"}
{"meta.helm.sh/release-name":"extra","meta.helm.sh/release-namespace":"myapp"}
{"a":"2"}
release "extra" uninstalled
Uninstalling extra after taking ownership will delete myapp-extra. This is the cost of --take-ownership .
helm upgrade myapp ./myapp -n myapp -f values-lab.yaml --set-string image.tag=9.9 \ --wait --timeout 45s --rollback-on-failure kubectl -n myapp get pods kubectl -n myapp get events --sort-by=.lastTimestamp | grep -iE 'pull|back-off' | tail -3
Error: UPGRADE FAILED: release myapp failed, and has been rolled back due to rollback-on-failure being set: context deadline exceeded NAME READY STATUS RESTARTS AGE myapp-6f7d9c8b4-p8hzt 1/1 Running 0 6m … Failed to pull image "myapp:9.9": … not found … Error: ErrImagePull … Back-off pulling image "myapp:9.9"
Helm only reports “timed out”; the root cause is in the events: the kind node does not have myapp:9.9 (whereas with IfNotPresent, a missing local image is pulled from docker.io and fails). After the automatic rollback, the old Pods keep serving.
Case 1: concurrent CI releases cause a pending lock
Problem: Two merges triggered the pipeline almost at the same time; the second started while the first was applying objects; the first was then canceled by the pipeline timeout (process killed), and the release got stuck in pending-upgrade, after which every release reported “another operation is in progress”. Approach: The pipeline adds a per-environment concurrency lock (GitHub Actions concurrency, Azure Pipelines exclusive-lock check); Helm's --timeout is set below the pipeline job timeout, so Helm marks the release failed itself rather than being killed; recover with helm rollback. Limitation: Helm's pending state is a “soft lock”: it cannot prevent two clients from reading a non-pending state at the same time and then writing concurrently.
Case 2: “resource already exists” when migrating from kubectl to Helm
Problem: The team wanted to bring the previously kubectl apply managed 20 objects into a new chart; the first install reported invalid ownership metadata for all of them. Approach: First use helm template to confirm that the objects rendered by the chart have the same names as the existing objects, then helm install … --take-ownership take ownership in one go (or script the labels and annotations); after taking ownership, use helm diff to confirm there are no unexpected changes. Limitation: Under SSA, the original kubectl field owners are still in managedFields, so the first upgrade may produce field conflicts, which requires --force-conflicts once.
Case 3: the real cause of the timeout was a PVC
Problem: The Redis upgrade --wait timed out and was rolled back, and the team suspected a chart bug. Approach:kubectl describe pvc They found the new StorageClass did not exist, the PVC was Pending, and the StatefulSet Pod could not be scheduled. After correcting persistence.storageClass it succeeded. Limitation: The StatefulSet's volumeClaimTemplates cannot be modified; changing storage parameters usually requires data migration, so a Helm upgrade alone is not enough (Lesson 4).
Interactive troubleshooting tree
Step through by the error or symptom you see, to get diagnostic commands and fix recommendations.
Common errors quick reference
Error: INSTALLATION FAILED: release name check failed: cannot reuse a name that is still in use
Cause: a release with the same name already exists in the same namespace (in any state: deployed, failed, or --keep-history a kept uninstalled record).
helm list -n NS -a | grep NAME helm history NAME -n NS --max 3
Fix: In CI, uniformly use helm upgrade --install; a release whose first install failed can be directly upgrade --install overwritten, or helm uninstall and then reinstalled.
Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress
Cause: the latest revision is pending-install/upgrade/rollback.
helm history NAME -n NS --max 3 kubectl get secret -n NS -l name=NAME,owner=helm --show-labels | tail -3
Fix: confirm there is no concurrency → pending-upgrade/rollback: helm rollback NAME <last successful revision>; pending-install (first install interrupted): helm uninstall NAME and then reinstall. Only as a last resort should you back up and delete the pending Secret (Lesson 7).
Error: … unable to continue with install: … exists and cannot be imported into the current release: invalid ownership metadata; …
Cause: an object with the same name already exists but does not belong to this release (created by kubectl, belonging to another release, or an orphan with a keep policy).
kubectl get KIND NAME -n NS -o jsonpath='{.metadata.labels}{"\n"}{.metadata.annotations}{"\n"}'
Fix: delete the old object / --take-ownership / add the missing app.kubernetes.io/managed-by=Helm labels and meta.helm.sh/release-name,meta.helm.sh/release-namespace annotations. When an annotation points to another release, it means two releases render an object with the same name, so rename it (e.g. fullnameOverride).
Error: … context deadline exceeded (--wait timeout)
Cause: the resource did not become ready within --timeout ; Helm 4's watcher strategy judges readiness by kstatus.
kubectl get pods -n NS kubectl describe pod POD -n NS | tail -20 kubectl get events -n NS --sort-by=.lastTimestamp | tail -15 kubectl get pvc -n NS
Fix: locate by events: ImagePullBackOff (image/credentials), CrashLoopBackOff (application/configuration; check logs --previous), Pending (resources/scheduling/PVC), Running but not Ready (probes).
Error: INSTALLATION FAILED: values don't meet the specifications of the schema(s) in the following chart(s): …
Cause: the chart includes a values.schema.json, and your values' types or required fields do not match it (CloudPirates redis does include a schema).
helm show values CHART --version X | less helm template x CHART --version X -f my.yaml 2>&1 | head
Fix: correct the types (string/integer/boolean) according to the path in the error, or fill in the required fields; do not use --skip-schema-validation to hide the problem.
1. Deploy CloudPirates redis 0.39.1 to namespace cache (create it if it does not exist), disable persistence, and wait until ready.
helm upgrade --install redis oci://registry-1.docker.io/cloudpirates/redis --version 0.39.1 -n cache --create-namespace --set persistence.enabled=false --wait
2. List all releases in namespace myapp that are in pending state, and show their latest 3 history entries.
helm list -n myapp --pending for r in $(helm list -n myapp --pending -q); do helm history "$r" -n myapp --max 3; done
A new colleague deployed myapp for the first time, and helm install failed due to a timeout (release status failed); he ran the same helm install again and got “cannot reuse a name that is still in use”. Explain this, give two ways to handle it, and explain how to avoid it in the future.
Although the first install failed, Helm had already written revision 1 (failed), so the name is still occupied; helm install Helm refuses whenever a record already exists. Handling: ① after fixing the root cause (check Pod events), continue with helm upgrade --install (this creates revision 2); ② use helm uninstall myapp to clean up the failed install, then re-install. To avoid this, use helm upgrade --install --wait --rollback-on-failure, so that when the first install fails, Helm automatically uninstalls and leaves a clean state.
Verified teaching videos
No verified video specifically explaining the 5 Helm errors in this module was found; a storyboard script is provided instead.
Official documentation
Video storyboard script (about 100 seconds)
Visual: inside the namespace box, Redis's StatefulSet and Secret appear first, then myapp's Deployment; a dashed secretKeyRef line connects the two.
Narration: Two releases, each managing its own. Redis uses a community chart, myapp uses its own chart, and each references the other's Service and Secret by name.
Screen: five red error cards fly in one after another and stick to different stages of the flow bar.
Narration: five kinds of errors occur at different stages: name check, lock, rendering, ownership, and finally the wait. The first four happen before the cluster has been changed.
Screen: a pending-upgrade Secret card with a lock on it; the rollback command unlocks it and produces a new deployed card.
Narration: a killed process leaves a pending record, which acts like a lock. Once you confirm there is no concurrent operation, roll back to the last successful revision.
Screen: context deadline exceeded in the terminal; the view moves down to kubectl get events, with ImagePullBackOff highlighted.
Narration: the timeout is only a symptom. The real cause is always in the Pod and the events.
Cheat sheet
Installation and environment
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-4 chmod 700 get_helm.sh && ./get_helm.sh helm version --short helm env helm completion bash > /etc/bash_completion.d/helm # requires root export HELM_DRIVER=secret # default; configmap / memory / sql
Repositories and charts
helm repo add NAME URL; helm repo update; helm repo list helm search repo NAME/CHART --versions [--devel] helm search hub KEYWORD helm show chart|values|readme|all CHART --version X helm pull CHART --version X --untar helm create NAME; helm lint NAME; helm package NAME -d dist helm repo index DIR --url URL
Install and upgrade
helm upgrade --install NAME CHART --version X -n NS --create-namespace \ -f values.yaml --wait --timeout 5m --rollback-on-failure \ --history-max 10 --description "…" helm install NAME CHART --dry-run=server --hide-secret helm upgrade NAME CHART --server-side=true # switch a legacy Helm 3 release to SSA helm upgrade NAME CHART --force-conflicts # take back conflicting SSA fields (use with caution) helm install NAME CHART --take-ownership # adopt existing objects (use with caution) # --wait=watcher|hookOnly|legacy (omitted = hookOnly; bare --wait = watcher)
Values
-f a.yaml -f b.yaml # b overrides a
--set a.b=c,list={x,y},arr[0].k=v # types are inferred automatically
--set-string tag=1.10 # force string
--set-json 'k=[{"a":1}]' # complex structures
--set-file cfg=./app.ini # file contents
--set-literal k='a,b.c' # literal string
--set key=null # delete a default key
# merge order: values.yaml < -f < --set-json < --set < --set-string < --set-file < --set-literal
helm get values NAME [--all] [--revision N] [-o json]
helm upgrade … --reset-then-reuse-values | --reuse-values | --reset-valuesHistory, rollback, uninstall
helm list [-A] [-a] [--pending|--failed|--uninstalled]
helm status NAME --show-resources
helm history NAME --max 10
helm rollback NAME REV --wait --cleanup-on-fail --description "…" # always write REV
helm uninstall NAME [--keep-history] [--wait] [--ignore-not-found]
kubectl get secret -A -l owner=helm,status=failed
kubectl get secret sh.helm.release.v1.NAME.vN -o jsonpath='{.data.release}' \
| base64 -d | base64 -d | gunzip | jq '.info.status'OCI
helm registry login HOST -u USER --password-stdin # host name only helm push dist/CHART-X.tgz oci://HOST/NS # do not include the chart name helm pull oci://HOST/NS/CHART --version X helm show all oci://HOST/NS/CHART --version X helm upgrade -i NAME oci://HOST/NS/CHART@sha256:DIGEST helm registry logout HOST # local repository: --plain-http (lab only)
template / get / diff
helm template NAME CHART -f v.yaml -s templates/deployment.yaml helm template NAME CHART --output-dir out/ --kube-version 1.37.0 -a API/VERSION helm template NAME CHART --dry-run=server # replaces the deprecated --validate helm get manifest|values|notes|hooks|metadata|all NAME [--revision N] helm get manifest NAME | kubectl diff -f - # recorded vs live helm diff upgrade NAME CHART -f v.yaml [--three-way-merge] [-C 3] [--detailed-exitcode] helm diff revision NAME 3 5; helm diff rollback NAME 3 helm plugin list
Troubleshooting
helm list -n NS -a # name still in use
helm history NAME -n NS --max 3 # pending-* ?
helm rollback NAME LAST_GOOD -n NS # clear pending (after confirming no concurrent operation)
helm template NAME CHART -f v.yaml --debug # rendering errors
kubectl get KIND N -o jsonpath='{.metadata.annotations}' # ownership
kubectl get pods,pvc -n NS; kubectl get events -n NS --sort-by=.lastTimestamp | tail
helm upgrade … --debug # observe the interaction between Helm and the APIHelm 3 → Helm 4 flag comparison
| Helm 3 | Helm 4 | Notes |
|---|---|---|
--atomic | --rollback-on-failure | Old names still work with a warning; once set --wait default is watcher |
--force | --force-replace | old name still works with a warning |
--wait (boolean) | --wait=watcher|hookOnly|legacy | --wait=true/false Warning |
| client-side three-way merge | --server-side (install defaults to true; upgrade/rollback default to auto) | used together with --force-conflicts |
--post-renderer ./script.sh | --post-renderer PLUGIN_NAME | must be a plugin |
helm template --validate | helm template --dry-run=server | --validate Deprecated |
helm plugin install GIT_URL | tarball + .prov, or --verify=false | verifies signatures by default |
helm registry login oci://host (previously tolerated) | helm registry login host | Accepts only host names |
Comprehensive lab + final quiz
lab namespace shop-helm. Requirements: Redis uses a community chart with a pinned version and digest; the password must not appear in myapp's release record; myapp's chart is distributed via OCI and deployed by digest; dev and prod values are kept in separate files; any failed release must roll back automatically; and finally you must use helm history to answer “who released what, and when,” and then uninstall cleanly.kubectl config use-context kind-lab
helm version --short
docker exec lab-worker crictl images | grep myapp
docker ps --filter name=helm-registry --format '{{.Names}}' || true
If the image is missing, go back to Module 0, step 3; if the local OCI repository has been deleted, restart it and log in again following steps 1–2 of the Module 6 lab.
helm upgrade --install redis \ oci://registry-1.docker.io/cloudpirates/redis@sha256:423b2ec14ca56bac26bf8ef429ed01e480eedeee0759fad2a71ef397b76f9dc4 \ -n shop-helm --create-namespace --set persistence.size=1Gi \ --wait --timeout 5m --rollback-on-failure --description "redis 0.39.1 pinned" helm list -n shop-helm
cd ~/helmlab
cp values-lab.yaml values-dev.yaml
cat > values-prod.yaml <<'EOF'
replicaCount: 2
podAnnotations:
owner: shop-team
resources:
requests: { cpu: 100m, memory: 96Mi }
limits: { memory: 192Mi }
EOF
helm template myapp ./myapp -f values-dev.yaml -f values-prod.yaml -s templates/deployment.yaml | grep -E 'replicas:|owner:|memory:|REDIS'
replicas: 2
owner: shop-team
memory: 192Mi
memory: 96Mi
- name: REDIS_HOST
- name: REDIS_PASSWORD
The prod file contains only the differences; env, probes, and ports come from the dev file — a deep map merge; requests and limits in resources are both overridden by prod.
sed -i 's/^version: .*/version: 1.0.0/' myapp/Chart.yaml
helm lint ./myapp -f values-dev.yaml -f values-prod.yaml
helm package myapp -d dist
helm push dist/myapp-1.0.0.tgz oci://localhost:5000/charts --plain-http
DIGEST=$(curl -sI -u 'lab:Lab-Pass-2026' -H 'Accept: application/vnd.oci.image.manifest.v1+json' \
http://127.0.0.1:5000/v2/charts/myapp/manifests/1.0.0 | awk -F': ' 'tolower($1)=="docker-content-digest"{print $2}' | tr -d '\r')
echo "myapp chart digest: $DIGEST"REF=oci://localhost:5000/charts/myapp@$DIGEST helm upgrade --install myapp $REF -n shop-helm -f values-dev.yaml -f values-prod.yaml \ --plain-http --wait --timeout 3m --rollback-on-failure --description "v1.0 initial" helm diff upgrade myapp $REF -n shop-helm -f values-dev.yaml -f values-prod.yaml \ --set-string image.tag=1.1 --plain-http -C 1 helm upgrade myapp $REF -n shop-helm -f values-dev.yaml -f values-prod.yaml \ --set-string image.tag=1.1 --plain-http --wait --rollback-on-failure --description "v1.1"
If your helm-diff version does not support --plain-http, first helm pull $REF --plain-http get a local .tgz, then run diff against the .tgz.
kubectl -n shop-helm port-forward svc/myapp 8080:5000 >/dev/null &
sleep 2; for i in 1 2 3; do curl -s localhost:8080; done; kill %1
helm get values myapp -n shop-helm --all | grep -ci password # should only show the REDIS_PASSWORD name, with no plaintext
kubectl -n shop-helm get secret sh.helm.release.v1.myapp.v2 -o jsonpath='{.data.release}' | base64 -d | base64 -d | gunzip | grep -c "$(kubectl -n shop-helm get secret redis -o jsonpath='{.data.redis-password}' | base64 -d)" || true
myapp v1.1 from myapp-…, hits=1 myapp v1.1 from myapp-…, hits=2 myapp v1.1 from myapp-…, hits=3 1 0
The last line should be 0: no plaintext Redis password can be found in myapp's release record.
helm upgrade myapp $REF -n shop-helm -f values-dev.yaml -f values-prod.yaml \ --set-string image.tag=2.0-missing --plain-http --wait --timeout 45s --rollback-on-failure --description "bad release" helm history myapp -n shop-helm
Error: UPGRADE FAILED: release myapp failed, and has been rolled back due to rollback-on-failure being set: context deadline exceeded REVISION … STATUS CHART APP VERSION DESCRIPTION 1 … superseded myapp-1.0.0 1.0 v1.0 initial 2 … superseded myapp-1.0.0 1.0 v1.1 3 … failed myapp-1.0.0 1.0 Upgrade "myapp" failed: context deadline exceeded 4 … deployed myapp-1.0.0 1.0 Rollback to 2
helm rollback myapp 1 -n shop-helm --wait --description "drill: back to v1.0" helm rollback myapp 4 -n shop-helm --wait --description "drill: back to v1.1" helm diff revision myapp 5 6 -n shop-helm -C 0 | grep image
helm uninstall myapp -n shop-helm --keep-history --wait helm list -n shop-helm --uninstalled helm uninstall redis -n shop-helm --wait kubectl -n shop-helm get pvc # data-redis-0 is still there: delete it once you confirm it is not needed kubectl -n shop-helm delete pvc data-redis-0 kubectl delete namespace shop-helm docker rm -f helm-registry # optional
The cluster is kept for Lesson 2; to free up resources: kind delete cluster --name lab. This lesson incurs no cloud costs at any point.
Open-ended self-check (answer first, then expand the reference answer)
1. Where is the release record stored in Helm 4, and what does it contain?
By default it is stored in a Secret in the release's namespace sh.helm.release.v1.NAME.vN (type helm.sh/release.v1, with labels name/owner/status/version). Its content is gzip + base64 JSON: the chart, the user values (config), the rendered manifest, hooks, status, and NOTES.
2. In order, list the helm upgrade --install main steps.
Read the history to decide install vs upgrade (refuse if pending) → load the chart → merge values (schema validation) → render (separate hooks, sort) → compare with the previous revision's manifest (or check ownership on install) → write a pending record → pre hooks → SSA apply/delete → wait per strategy (kstatus) → post hooks → settle the record (deployed/superseded or failed, with automatic rollback if configured) and prune records beyond history-max.
3. Omitting --wait, writing --wait, and writing --rollback-on-failure How do the three differ in waiting behaviour?
Omitted: hookOnly, only hooks are waited on, and the object counts as successful once submitted; --wait: watcher, kstatus waits until all objects are ready; --rollback-on-failure: when unspecified, --wait the default becomes watcher, and on failure install is uninstalled and upgrade rolls back to the last successful release.
4. When upgrading with only --set image.tag=x, what happens to the previous user values? How do you avoid this?
are discarded (when new values are given without the reuse flag), falling back to the chart defaults. To avoid this: a complete values file + -f; or --reset-then-reuse-values; do not rely on --reuse-values (this ignores the new chart defaults).
5. Why must production deployments use the chart digest?
OCI tags can be overwritten, so the same version number may point to different content. A digest is a hash of the manifest content and is immutable. Helm 4 supports installing by digest and refuses any mismatch, which guarantees that what gets deployed is the exact artifact that was reviewed and scanned.
6. When you see another operation (install/upgrade/rollback) is in progress, what are your steps?
helm history Confirm the latest revision is pending-*; confirm there are no concurrent helm processes or pipelines; for pending-upgrade/rollback, use helm rollback NAME <last successful revision>; for pending-install, uninstall and reinstall; only as a last resort, back up and delete the pending Secret. Afterwards, add a concurrency lock to the pipeline and make Helm's timeout shorter than the job timeout.
Final quiz (12 questions, covering all modules)
Sources and version notes
| Topic | Verified finding | Sources (accessed 2026-11-15) |
|---|---|---|
| Helm version | Latest v4.3.2 (2026-11-13); v4.3.1 (2026-10-15); v4.3.0 (2026-09-09); Helm 3 line v3.22.1 (2026-10-15). Helm 4.0.0 was released on 2025-11-12; Helm 3 security fixes run until 2027-02-10 | helm/helm releases · Helm 4 Released |
| Helm 4 changes | --atomic→--rollback-on-failure,--force→--force-replace; new installs default to SSA, upgrades and rollbacks keep the existing method; post-renderer must be a plugin; Wasm plugin runtime and plugin types; install by digest; registry login accepts host names only; Chart API v3 is experimental | Helm 4 Overview |
| Installation | get-helm-4 script; Homebrew/Chocolatey/Scoop/winget/apt/dnf/snap are community-maintained | Installing Helm |
| install/upgrade flags | --wait default hookOnly, watcher when written alone, optional legacy; --server-side install defaults to true, upgrade/rollback default to auto; --history-max 10; --timeout 5m; --dry-run none/client/server; --take-ownership,--reset-then-reuse-values | helm upgrade · helm install · source code pkg/cmd/flags.go |
| Internal mechanics | release status enum; Secret driver type and labels (including createdAt/modifiedAt); pending-lock error text; cannot reuse a name that is still in use; ownership-check error text; rollback default target = current − 1, and after success supersedes all deployed; upgrade values reuse logic; --set* merge order; --dry-run=server does not write records or submit objects | helm/helm main-branch source: pkg/release/common/status.go,pkg/storage/driver/secrets.go,pkg/action/{install,upgrade,rollback,validate,action}.go,pkg/cli/values/options.go |
| helm template | --validate Marked deprecated (suggests using --dry-run=server), and --dry-run are mutually exclusive | helm template · source code pkg/cmd/template.go |
| plugin verification | helm plugin install --verify Default true; Git sources report “plugin source does not support verification”; local directories are skipped | source pkg/cmd/plugin_install.go |
| helm-diff | v3.15.15 (2026-09-26); the README requires Helm 3.18+ and gives the Helm 4 GPG verification install method and fingerprint | databus23/helm-diff |
| OCI | reference rules, media types, supported hosted repositories; podinfo 6.17.0 OCI manifest digest sha256:258d0da5…cea58 (ghcr.io, including the cosign signature tag); CloudPirates redis 0.39.1 digest sha256:423b2ec1…9dc4 | Use OCI-based registries(the page notes it has not been fully updated for Helm 4) · live repository API check |
| helm create | skeleton files (including the httproute.yaml that Helm 4 adds), default values (appVersion 1.16.0, service.port 80, containerPort taken from service.port), no env entry point | source pkg/chart/v2/util/create.go |
| Community charts | podinfo 6.17.0 (HTTP repository stefanprodan.github.io/podinfo); CloudPirates redis 0.39.1 / appVersion 8.10.2, verified publisher, depends on common 2.2.1, defaults to standalone, auth enabled, 8Gi persistence, no NOTES.txt | Artifact Hub · actual chart package contents checked |
| Bitnami directory changes | Starting 2025-08-28, versioned free images were moved to bitnamilegacy (no longer updated); the free tier keeps only a few latest images; the chart source code is still Apache 2.0 | Broadcom community announcement |
| kind / Kubernetes | kind v0.33.0 default kindest/node:v1.37.0; latest Kubernetes v1.37.1 | verified in the same repository's K8s course · kind releases |
Video verification notes
The following videos had their titles and channels verified through the YouTube oEmbed API on 2026-11-15: IBM Technology “What is Helm?” (fy8SHvNZGeE); TechWorld with Nana “What is Helm in Kubernetes? Helm and Helm Charts explained | Kubernetes Tutorial 23” (-ykwb1d0DXU); KodeKloud “What is Helm? | Helm Concepts Explained | KodeKloud” (kJscDZfHXrQ); That DevOps Guy “Introduction to Helm | Kubernetes Tutorial | Beginners Guide” (5_J7RWLLVeQ); DevOps Journey “Helm and Helm Charts Explained - Helm Tutorial for Beginners” (w51lDVuRWuk) and “How to Create Helm Charts - The Ultimate Guide” (jUYNS90nq8U); CNCF “Building Helm Charts From the Ground Up: An Introduction to Kubernetes [I] - Amy Chen, Heptio” (vQX5nokoqrQ); Rahul Wagh “Complete Helm Chart Tutorial: From Beginner to Expert Guide” (DQk8HOVlumI); Matthew Palmer “Helm and Kubernetes Tutorial - Introduction” (9cwjtN3gkD4). oEmbed does not return durations or publish dates, so durations are not listed on the cards. All of these videos were recorded before Helm 4 and cover Tiller,--atomic, boolean values --wait ; this lesson’s content takes precedence. No verified Helm 4 dedicated videos were found (covering SSA, kstatus, plugin verification, and OCI digests), so the relevant modules include storyboard scripts instead.
Voice narration notes
The “Audio” tab uses the browser's built-in Web Speech API (speechSynthesis, en-US) to read the narration script aloud in real time, with English terms pronounced in en-US. The result depends on the speech voices installed on the operating system. This courseware does not embed any MP3 files; if you need offline audio, pass the narration script to a TTS service.
Known limitations
- The times, hashes, Pod name suffixes, IPs, revision numbers and some error text in the “Expected output” sections are sample values. The commands in this courseware have not actually been run in this environment, so use your own actual output.
- The helm.sh documentation version selector showed 4.3.1 at verification time, while GitHub had already published 4.3.2. Some parameters follow the helm/helm main-branch source, and the main branch may be ahead of the 4.3.2 release (for example
helm history --show-rollback-revisionand other new parameters not used in this lesson). - The exact error text for kstatus wait timeouts and SSA field conflicts varies with Helm and Kubernetes versions; this lesson shows typical forms.
- The versions and digests of community charts (podinfo, CloudPirates redis) reflect the state as of 2026-11-15; publishers may update or withdraw versions, so re-verify when needed.
- The state transitions in the animations and simulators are simplified from the source logic to illustrate the mechanism; they do not cover every edge case (such as hook failures or cleanup details after some objects are created and then fail).
- Using the local OCI repository
--plain-httpand plaintext test passwords; for lab environments only.