helm upgrade --wait is running, on the right kubectl get secret -l owner=helm -L status -w live shows v2 = pending-upgrade.sh.helm.release.v1.<name>.v<N> and the state machine (pending-* / deployed / failed / superseded), ownership labels and annotations, server-side apply field managers, kstatus waiting, Go template evaluation, values merge order, OCI references and digests, and hook phases and weights.lab cluster to reproduce, diagnose, fix and clean up 14 typical faults, no cloud account needed (for cloud-related issues, diagnostic commands and expected output are provided).| # | Time | Module | Core content | Animation · interaction | Lab (kind cluster lab) |
|---|---|---|---|---|---|
| 0 | Before class | Instructions and fault lab environment | Helm 4.3 + kind cluster lab + myapp image; lab8 namespace and cleanup rules | Environment check | Create ~/helmlab/lab8 the fault chart |
| 1 | 00–08 | A · Install, upgrade and Release status | Issues 1–12: name in use, pending lock, no deployed releases, ownership conflicts, wait timeouts, field is immutable, cluster unreachable, release not found in namespace, auto-rollback wiping the evidence, history pruned, release over 1 MiB, SSA conflicts | Release state machine simulator | pending-upgrade recovery · ownership takeover · immutable fields · timeouts |
| 2 | 08–16 | A · Templates and Values | Issues 13–25: YAML parse error, nil pointer, required, schema validation, --set types, --reuse-values, list overrides, undefined function, range scope, config not rolling, subchart values, lookup/random values, kubeVersion | “Rendering error” troubleshooting tree | indentation · nil pointer · schema · reuse-values |
| 3 | 16–24 | A · Repositories, OCI and cloud platforms | Issues 26–38: invalid repository, version not found, CI missing repository, missing dependency, registry login, OCI 401, “+” turning into “_”, digest mismatch, ECR repository does not exist, AKS kubelogin, EKS exec apiVersion, LBC webhook, identity annotations | “Pull/authentication failure” troubleshooting tree | local OCI registry · dependency build · install by digest |
| 4 | 24–30 | A · Hooks, CRDs, GitOps and migration | Issues 39–50: hook failure/timeout, leftover hooks, hook order, CRD not upgraded, CRD not installed, uninstall deletes CRDs, Argo CD and helm list, random values causing OutOfSync, Flux retries exhausted, API removed, Helm 4 flags and wait semantics, post-renderer as plugins | Hook execution timeline simulator | hook failure · before-hook-creation · CRD order |
| 5 | 30–37 | B · Core concepts and architecture | Questions 1–13 | Mock interview | 2 scenario questions |
| 6 | 37–44 | B · Chart development and templates | Questions 14–25 | Mock interview | 2 scenario questions |
| 7 | 44–52 | B · Distribution, security and CI/CD | Questions 26–38 | Mock interview | 3 scenario questions |
| 8 | 52–60 | B · Production practice and scenario design | Questions 39–50 | Mock interview | 3 scenario questions |
| — | After class | Cheat sheet · Comprehensive drill | 50 “error → first command → fix” entries; 50 flash cards; 8 mixed faults; full mock interview | Full mock interview | 12-question final quiz |
| Topic | m1 | m2 | m3 | m4 | m5 | m6 | m7 | m8 |
|---|---|---|---|---|---|---|---|---|
| Release storage / state machine / history | ● | — | — | ● | ● | — | — | ● |
| install / upgrade / rollback flow and waiting | ● | — | — | ● | ● | — | ● | ● |
| template syntax / scope / functions | — | ● | — | — | — | ● | — | — |
| Values merging / schema / subcharts | — | ● | ● | — | ● | ● | — | ● |
| repositories / OCI / dependencies / signing | — | — | ● | — | — | ● | ● | — |
| SSA / ownership / immutable fields | ● | — | — | ● | ● | — | — | ● |
| Hooks / CRDs / testing | — | — | — | ● | — | ● | — | ● |
| CI/CD / GitOps / Helmfile | — | — | ● | ● | — | — | ● | ● |
| AKS / EKS / cloud identity | ● | — | ● | — | — | — | ● | ● |
| Helm 3 → 4 migration | ● | — | ● | ● | ● | — | — | ● |
in progress,nil pointer,immutable,401) into the filter box.Symptom → root cause (at the mechanism level) → diagnostic command → example expected output → fix → prevention and best practices → see Lesson N. Titles use the exact error text Helm actually prints (checked against the error strings in the Helm 4.3.2 source); where Helm 3 and Helm 4 word things differently, both are listed. Text returned by the Kubernetes API server and cloud vendor CLIs varies by version, and this is noted in each entry.
Question → 30-second answer → in-depth answer (principle, code) → common follow-ups → bonus points → common wrong answers. Difficulty:BasicIntermediateAdvanced.
| Lesson | Most-referenced content in this course |
|---|---|
| Lesson 1 core basics | architecture, release Secret, install/upgrade mechanics, values precedence, rollback/history, OCI, template/get/diff |
| Lesson 2 Writing production-grade charts | Go templates and Sprig, _helpers.tpl and scope, values design, values.schema.json, dependencies and library charts, lint/test |
| Lesson 3 Azure · Lesson 4 AWS | ACR/ECR as OCI repositories, Workload Identity / Pod Identity, LBC, pipeline deployment |
| Lesson 5 CI/CD and GitOps | ct, chart-releaser, signing, Argo CD, Flux HelmRelease, Helmfile, automatic rollback |
| Lesson 6 Hands-on chart architecture | umbrella chart, layered values, secrets, hooks, post-renderer, CRDs, zero downtime |
| Lesson 7 Deep troubleshooting | --debug, pending-upgrade, hook timeouts, SSA conflicts, template debugging, release size, Helm 3→4 migration |
--atomic → --rollback-on-failure,--force → --force-replace (old flags still work but warn); new installs default to server-side apply (upgrades and rollbacks keep the release’s original method; can use --server-side to override); --wait can take watcher (kstatus) / hookOnly (default when omitted) / legacy; post-renderer must be a plugin; helm registry login accepts only domain names; OCI charts can be installed by digest. The last Helm 3 feature release is 3.22 (2026-09), with security fixes until 2027-02-10. Kubernetes v1.37 (kind v0.33.0, kindest/node:v1.37.0). All “expected output” shown is illustrative; names, times and digests will differ in your environment.lab, kubectl is available, and the myapp:1.0/1.1 images are loaded onto the kind nodes.~/helmlab/lab8/myapp, and start a local OCI registry.lab8-* namespace, and clean up immediately when done.~/helmlab/kind-lab.yaml, a cluster lab (1 control-plane + 2 worker, kindest/node:v1.37.0), and myapp:1.0,myapp:1.1 images.yq,helm-diff plugins.helm version --short kubectl config current-context kubectl get nodes docker exec lab-worker crictl images | grep myapp
v4.3.2+g… kind-lab NAME STATUS ROLES AGE VERSION lab-control-plane Ready control-plane 3d v1.37.0 lab-worker Ready <none> 3d v1.37.0 lab-worker2 Ready <none> 3d v1.37.0 docker.io/library/myapp 1.0 … docker.io/library/myapp 1.1 …
Cluster deleted? Rebuild it per Lesson 1, Module 0, steps 2–3, and kind load docker-image myapp:1.0 myapp:1.1 --name lab.
A minimal chart with a “production shape”: Deployment + Service + ConfigMap + an optional pre-upgrade migration Job. Each module’s reproduction lab deliberately breaks something in its copy.
mkdir -p ~/helmlab/lab8 && cd ~/helmlab/lab8
helm create myapp >/dev/null && rm -rf myapp/templates/tests myapp/templates/hpa.yaml myapp/templates/ingress.yaml myapp/templates/httproute.yaml
cat > myapp/values.yaml <<'EOF'
replicaCount: 1
image:
repository: myapp
tag: "1.0"
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 80
containerPort: 5000
config:
greeting: hello
migration:
enabled: false
command: ["sh", "-c", "echo migrate ok"]
serviceAccount:
create: true
annotations: {}
name: ""
automount: false
podAnnotations: {}
podLabels: {}
podSecurityContext: {}
securityContext: {}
resources: {}
nodeSelector: {}
tolerations: []
affinity: {}
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
ingress:
enabled: false
httpRoute:
enabled: false
autoscaling:
enabled: false
livenessProbe:
httpGet: {path: /healthz, port: http}
readinessProbe:
httpGet: {path: /healthz, port: http}
volumes: []
volumeMounts: []
EOF
sed -i 's/containerPort: {{ .Values.service.port }}/containerPort: {{ .Values.containerPort }}/' myapp/templates/deployment.yaml
cat > myapp/templates/configmap.yaml <<'EOF'
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "myapp.fullname" . }}
labels:
{{- include "myapp.labels" . | nindent 4 }}
data:
GREETING: {{ .Values.config.greeting | quote }}
EOF
cat > myapp/templates/migrate-job.yaml <<'EOF'
{{- if .Values.migration.enabled }}
apiVersion: batch/v1
kind: Job
metadata:
name: {{ include "myapp.fullname" . }}-migrate
annotations:
"helm.sh/hook": pre-install,pre-upgrade
"helm.sh/hook-weight": "0"
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
spec:
backoffLimit: 0
template:
spec:
restartPolicy: Never
containers:
- name: migrate
image: busybox:1.37
command: {{ toJson .Values.migration.command }}
{{- end }}
EOF
helm lint myapp && helm template t myapp | grep -c '^kind:'
==> Linting myapp [INFO] Chart.yaml: icon is recommended 1 chart(s) linted, 0 chart(s) failed 4
helm create The generated templates vary slightly by Helm version (for example, whether httproute.yaml is included); the command above rm -rf does not fail on missing files. If sed no port line matches, manually change the Deployment’s containerPort to {{ .Values.containerPort }}.
docker run -d --name lab8-registry -p 5001:5000 registry:3 helm package myapp -d /tmp/lab8 && helm push /tmp/lab8/myapp-0.1.0.tgz oci://localhost:5001/charts --plain-http
Successfully packaged chart and saved it to: /tmp/lab8/myapp-0.1.0.tgz Pushed: localhost:5001/charts/myapp:0.1.0 Digest: sha256:4c1e…
helm status/history/get all,--debug,kubectl get secret -l owner=helm,helm template --debug,kubectl get … --show-managed-fields.lab8-, with release names using myapp or m1a and similar lab numbers.kubectl config current-context confirm you are on kind-lab; in production, back up before any operation that modifies a release Secret (kubectl get secret … -o yaml > backup.yaml).for ns in $(kubectl get ns -o name | grep 'namespace/lab8-' | cut -d/ -f2); do kubectl delete ns "$ns" --wait=false; done docker rm -f lab8-registry; rm -rf /tmp/lab8
helm upgrade --install sequence: check the latest revision (refuse if pending) → render → write pending-upgrade the new revision → ownership check → call the API (SSA or three-way merge) → wait → mark the new revision as deployed, and mark the old one as superseded.helm history status column to tell whether the next command will succeed, and recover safely from pending/failed states.Enter a keyword from the error (such as in progress,reuse,ownership,immutable) to filter; click a row to jump to the matching entry in “Issue details”.
$ helm install myapp ./myapp -n lab8-m1 Error: INSTALLATION FAILED: cannot reuse a name that is still in use
In the Helm 4.3 source, the string is cannot reuse a name that is still in use; earlier Helm 3 versions write it as cannot re-use a name that is still in use, so try both when searching.
Symptom: CI’s first deploy succeeds, but every later run of helm install fails, or a retry after a failed install also fails.
Root cause:helm install It first calls availableName(): it looks up the same-named release’s history in that namespace’s storage driver, and refuses unless the last revision is “uninstalled / failed with --replace”, so it refuses. Release names are unique within a namespace; helm uninstall --keep-history leftover uninstalled records and failed records from a failed first install both make a same-named install fail.
helm list -n lab8-m1 -a # -a shows all statuses (including failed, pending, uninstalled) helm history myapp -n lab8-m1 kubectl get secret -n lab8-m1 -l owner=helm,name=myapp
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION myapp lab8-m1 1 … deployed myapp-0.1.0 1.16.0 REVISION UPDATED STATUS CHART APP VERSION DESCRIPTION 1 … deployed myapp-0.1.0 1.16.0 Install complete
# Use the idempotent upgrade --install in deploy scripts (installs if missing, upgrades if present) helm upgrade --install myapp ./myapp -n lab8-m1 --create-namespace --wait --timeout 5m # The last attempt was a failed first install and you have decided to discard it: helm uninstall myapp -n lab8-m1 # then install; or install --replace (only for failed/uninstalled; official docs say it is unsafe for production)
helm upgrade --install, not separate install/upgrade branch logic.invalid release name, must match regex … and the length must not be longer than 53).$ helm upgrade myapp ./myapp -n lab8-m1 Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress
Symptom: After a previous deployment is interrupted by Ctrl+C, a CI cancellation, a reclaimed runner, or a dropped kubectl context, every later upgrade/rollback reports this message. helm list This release is not visible by default (the default list only shows deployed/failed).
Root cause: Helm has no server-side lock; it treats “the status of the last revision being pending-install / pending-upgrade / pending-rollback” as a pessimistic lock (source comment: “This should act as a pessimistic lock”). When a run finishes normally, Helm changes it to deployed or failed; if the process dies midway, it stays at pending forever. Another pipeline may really be running— in that case, forcing recovery would let two processes modify the same set of objects at the same time.
helm history myapp -n lab8-m1 --max 5 helm list -n lab8-m1 --pending kubectl get secret -n lab8-m1 -l owner=helm,name=myapp -L status,version
REVISION STATUS CHART DESCRIPTION 3 superseded myapp-0.1.0 Upgrade complete 4 deployed myapp-0.1.0 Upgrade complete 5 pending-upgrade myapp-0.1.0 Preparing upgrade NAME TYPE DATA AGE STATUS VERSION sh.helm.release.v1.myapp.v4 helm.sh/release.v1 1 2h deployed 4 sh.helm.release.v1.myapp.v5 helm.sh/release.v1 1 9m pending-upgrade 5
# 1) First confirm no pipeline or terminal is still operating on this release (check CI, check the Secret’s AGE) # 2) Preferred: roll back to the last deployed revision; this creates a new revision 6 and clears pending helm rollback myapp 4 -n lab8-m1 --wait # 3) If rollback also fails (for example pending-install, with no version to roll back to), back up and then delete the stuck release Secret kubectl get secret sh.helm.release.v1.myapp.v5 -n lab8-m1 -o yaml > rev5-backup.yaml kubectl delete secret sh.helm.release.v1.myapp.v5 -n lab8-m1 helm upgrade --install myapp ./myapp -n lab8-m1 --wait
concurrency + cancel-in-progress: false; Azure Pipelines uses an exclusive lock check).--timeout, otherwise the runner is killed first and Helm has no time to write failed.See Lesson 7 Module 2 Stuck releases: pending-upgrade and other states.
$ helm upgrade myapp ./myapp -n lab8-m1 Error: UPGRADE FAILED: "myapp" has no deployed releases
Symptom: For a name that has never been installed successfully, running an upgrade without --install the helm upgrade; or once the release has already been uninstall --keep-history.
Root cause: upgrade first looks for the “last undeleted revision”; if none is found, it returns ErrNoDeployedReleases (the source keeps this error deliberately for compatibility). In early Helm 3 versions, “a first install that failed (only one failed revision)” also triggered it; current versions continue the upgrade from failed, but when history has no deployed version it still cannot rollback reach a successful state.
helm history myapp -n lab8-m1 helm list -n lab8-m1 -a --filter '^myapp$'
Error: release: not found (or) REVISION STATUS DESCRIPTION 1 uninstalled Uninstallation complete
helm upgrade --install myapp ./myapp -n lab8-m1 --wait # History only has uninstalled entries and you no longer need them: helm uninstall myapp -n lab8-m1 # clear the records kept by keep-history, then install again
--install; use -n an explicit namespace (see #8).--keep-history, and document in the runbook how to reinstall.Error: INSTALLATION FAILED: unable to continue with install: Deployment "myapp" in namespace "lab8-m1" 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 "myapp"; annotation validation error: missing key "meta.helm.sh/release-namespace": must be set to "lab8-m1"
The similar Helm 3 error starts with rendered manifests contain a resource that already exists. Unable to continue with install: … ; on upgrade it is unable to continue with update.
Symptom: Switching an app that was managed with kubectl apply/Kustomize to Helm; or two releases rendering same-named objects (for example, two charts both creating redis Service).
Root cause: Before creating an object, Helm runs an ownership check on a “same-named object already in the cluster” (checkOwnership): it must have both the label app.kubernetes.io/managed-by=Helm and the annotation meta.helm.sh/release-name,meta.helm.sh/release-namespace, with values matching the current release. If missing, the import is refused so that Helm does not silently take over or overwrite someone else’s object.
kubectl get deploy myapp -n lab8-m1 -o jsonpath='{.metadata.labels}{"\n"}{.metadata.annotations}{"\n"}' | jq -c .
kubectl get deploy myapp -n lab8-m1 --show-managed-fields -o jsonpath='{range .metadata.managedFields[*]}{.manager}{"\n"}{end}'
{"app":"myapp"}
{"kubectl.kubernetes.io/last-applied-configuration":"{…}"}
kubectl-client-side-apply
# Option A: explicitly annotate the objects so Helm can take them over (only if they belong to this release) kubectl label deploy myapp -n lab8-m1 app.kubernetes.io/managed-by=Helm --overwrite kubectl annotate deploy myapp -n lab8-m1 meta.helm.sh/release-name=myapp meta.helm.sh/release-namespace=lab8-m1 --overwrite helm upgrade --install myapp ./myapp -n lab8-m1 # Option B: Helm 3.17+ / 4 provides --take-ownership, which skips the check and takes over directly (it rewrites the annotations) helm upgrade --install myapp ./myapp -n lab8-m1 --take-ownership
helm template + kubectl diff confirm the rendered output is equivalent to the existing objects, so the takeover does not change the selector (which would trigger #6).{{ include "myapp.fullname" . }}), so two releases will not collide.--take-ownership Use only during a migration window; do not put it in the regular pipeline — it can also “steal” another release’s objects.See Lesson 7 Module 4 SSA and field ownership,Lesson 1 Module 3.
Error: UPGRADE FAILED: resource Deployment/lab8-m1/myapp not ready. status: InProgress, message: Available: 0/1 context deadline exceeded
Helm 4 waiting is based on kstatus, with errors listed per resource not ready. status: …, message: …, ending with context deadline exceeded; the message text is generated by kstatus and may vary between versions.
Symptom: Adding --wait (or --rollback-on-failure, which sets the wait strategy default to watcher), deployments that fail after --timeout (default 5m), the revision is marked failed.
Root cause: Helm only waits; the real cause is in Kubernetes: image cannot be pulled, probes fail, resources are insufficient to schedule, PVC not bound, LoadBalancer not getting an address, and so on. Helm 4’s watcher waits for every resource’s kstatus to reach Current; when omitted --wait it defaults to hookOnly, which only waits for hooks.
helm status myapp -n lab8-m1 --show-resources kubectl get deploy,rs,pod -n lab8-m1 -l app.kubernetes.io/instance=myapp kubectl describe pod -n lab8-m1 -l app.kubernetes.io/instance=myapp | sed -n '/Events/,$p' kubectl get events -n lab8-m1 --sort-by=.lastTimestamp | tail -15
NAME READY STATUS RESTARTS AGE pod/myapp-7c9d8b6f4d-2xk8q 0/1 ImagePullBackOff 0 5m Warning Failed kubelet Failed to pull image "myapp:1.2": … not found
helm upgrade; or helm rollback myapp <previous deployed>.--timeout 15m, and confirm the CI job timeout is longer.--wait --timeout in production deployments rather than relying on defaults; when waiting for a Job, add --wait-for-jobs.helm status --show-resources and events.See Lesson 7 Module 1 troubleshooting methodology,Lesson 5 Module 7 upgrade strategies and automated rollback.
Error: UPGRADE FAILED: cannot patch "myapp" with kind Deployment: Deployment.apps "myapp" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app.kubernetes.io/instance":"myapp", "app.kubernetes.io/name":"myapp", "tier":"web"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable
With server-side apply the outer prefix differs (for example failed to apply …), but the core field is immutable message still comes from the API server. For a Job’s spec.template, StatefulSet’s volumeClaimTemplates, Service’s clusterIP work the same way.
Symptom: A label was added to or changed in the chart’s selectorLabels, or the chart name/nameOverride, and the upgrade is rejected.
Root cause: Kubernetes requires a Deployment’s spec.selector is immutable after creation; Helm simply hands the new manifest to the API server. Many charts put app.kubernetes.io/version or the chart version mistakenly into the selector, which triggers the failure on every version bump.
helm get manifest myapp -n lab8-m1 | yq 'select(.kind=="Deployment").spec.selector' helm template myapp ./myapp -n lab8-m1 | yq 'select(.kind=="Deployment").spec.selector' helm diff upgrade myapp ./myapp -n lab8-m1 # if the helm-diff plugin is installed
# Preferred: restore the selector to its original value (the selector should only contain name + instance) # If the change is truly needed: plan downtime, delete the object and let Helm recreate it kubectl delete deploy myapp -n lab8-m1 --cascade=orphan # keeps Pods to reduce disruption; once the new RS is up, old Pods must be cleaned up manually helm upgrade myapp ./myapp -n lab8-m1 --wait # or --force-replace (--force in Helm 3): delete and recreate the object; this causes disruption
selectorLabels Include only app.kubernetes.io/name and app.kubernetes.io/instance; put version labels in labels.ct install --upgrade), which catches immutable-field changes before merge.See Lesson 2 Module 8 Chart readiness review and common mistakes,Lesson 6 Module 7 zero downtime and compatibility.
Error: kubernetes cluster unreachable: Get "https://127.0.0.1:41235/version": dial tcp 127.0.0.1:41235: connect: connection refused
Symptom: The local kind cluster was deleted or restarted, CI has no kubeconfig, or the kubeconfig points to another machine’s address.
Root cause: Helm uses the same kubeconfig resolution rules as kubectl (--kubeconfig > KUBECONFIG > ~/.kube/config, the context is determined by --kube-context/HELM_KUBECONTEXT ), and before running it first requests /version to check connectivity. sudo helm Running it under sudo reads root’s kubeconfig, which is also a common cause.
helm env | grep -E 'KUBE|NAMESPACE' kubectl config current-context && kubectl cluster-info echo "$KUBECONFIG"; kind get clusters
kind export kubeconfig --name lab # rewrite the kind-lab context helm list -A --kube-context kind-lab # CI: first run the cloud vendor’s credential step (az aks get-credentials / aws eks update-kubeconfig), then run helm
--kube-context, to avoid implicit “deploy to current context” behavior hitting the wrong cluster.sudo helm; in CI, generate kubeconfig as a short-lived credential and do not commit it to the repository.See Lesson 1 Module 0 environment setup; for cloud authentication issues see #35, #36.
$ helm status myapp Error: release: not found $ helm list NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
Symptom: The Pod is running, but Helm says there is no such release; a colleague can see it.
Root cause: Release records are stored in the namespace where the release lives Secrets, and by default Helm only looks in the current context’s namespace (usually default). Three other possibilities: ① the app is actually deployed by Argo CD using helm template rendered output, so there is no Helm release at all (see #45); ② a different storage driver is used (HELM_DRIVER=configmap or sql); ③ the release is in pending/uninstalled,helm list which is not shown by default.
helm list -A -a | grep myapp
kubectl get secret,configmap -A -l owner=helm,name=myapp
kubectl get deploy myapp -n lab8-m1 -o jsonpath='{.metadata.annotations.meta\.helm\.sh/release-name}{" "}{.metadata.labels}{"\n"}'
myapp lab8-m1 3 … deployed myapp-0.1.0 1.16.0 NAMESPACE NAME TYPE DATA AGE lab8-m1 sh.helm.release.v1.myapp.v3 helm.sh/release.v1 1 1h
Add -n lab8-m1 (or helm --namespace) to all Helm commands; standardize the storage driver across the team; for apps managed by Argo CD, use argocd app get instead of Helm commands.
kubectl config set-context --current --namespace to “save effort”; in a shared terminal it causes this kind of problem.Error: INSTALLATION FAILED: release myapp failed, and has been uninstalled due to rollback-on-failure being set: resource Deployment/lab8-m1/myapp not ready. status: InProgress, message: … context deadline exceeded
Symptom: After a first install fails, nothing is left — no Pods and no events to inspect; a failed upgrade is rolled back automatically, so developers only see “rollback succeeded” and do not know why the new version failed.
Root cause:--rollback-on-failure (the original --atomic) on install failure runs uninstall, and on upgrade failure it rolls back to the previous successful version. This is correct production protection, but it deletes the failed Pods, so the diagnostic information disappears with them. It also implicitly waits (watcher), and the timeout is what counts as failure.
helm history myapp -n lab8-m1 # upgrade case: shows the failed revision and its description helm get values myapp -n lab8-m1 --revision 7 kubectl get events -n lab8-m1 --sort-by=.lastTimestamp | tail -30 # events are kept for about 1 hour by default
# When reproducing, remove automatic rollback to keep the evidence: helm upgrade --install myapp ./myapp -n lab8-m1-debug --create-namespace --wait --timeout 3m kubectl describe pod -n lab8-m1-debug -l app.kubernetes.io/instance=myapp
kubectl logs --previous,describe), then lets the rollback happen; or, in --rollback-on-failure addition to using --cleanup-on-fail a flag that only cleans up newly created objects.See Lesson 5 Module 7 upgrade strategies and automated rollback.
$ helm rollback myapp 3 -n lab8-m1 Error: release has no 3 version
Symptom: You want to go back to “the version from last month”, but history only keeps the latest 10 entries.
Root cause:helm upgrade ’s default --history-max is 10: after each upgrade, the oldest revision Secret is deleted (deployed is kept). If the rollback target is not in storage, this message appears; revision numbers themselves are never reused.
helm history myapp -n lab8-m1 -o json | jq -r '.[]|"\(.revision) \(.status) \(.chart) \(.app_version)"'
14 superseded myapp-0.4.2 1.4.2 … 23 deployed myapp-0.5.1 1.5.1
# Rollback = redeploy with the “chart version and values from that time”. When the old chart version is still in the repository: helm upgrade myapp oci://localhost:5001/charts/myapp --version 0.3.0 -f values-2026-10.yaml -n lab8-m1 --wait
--history-max (for example 20), but do not set it to 0 (unlimited), or the namespace’s Secrets grow without bound.See Lesson 1 Module 5,Lesson 7 Module 6 Release storage and cleanup.
Error: UPGRADE FAILED: create: failed to create: Secret "sh.helm.release.v1.myapp.v8" is invalid: data: Too long: must have at most 1048576 bytes
Symptom: A large umbrella chart, or large files (dashboard JSON, certificate bundles, CRDs) placed in templates or .Files in the chart, makes the upgrade fail at the “write release record” step.
Root cause: Helm serializes the whole release (rendered manifests + chart templates and files + values) into JSON → gzip → base64 and stores it in a single Secret; Kubernetes limits data in a single Secret/ConfigMap to 1 MiB. The chart’s files files also get stored in it.
kubectl get secret -n lab8-m1 -l owner=helm,name=myapp -o json | jq -r '.items[]|"\(.metadata.name) \(.data.release|length)"' helm get manifest myapp -n lab8-m1 | wc -c helm show chart ./myapp; du -sh myapp/files myapp/charts 2>/dev/null
.helmignore to exclude test data, docs and examples.HELM_DRIVER=sql, requires PostgreSQL), but evaluate the operational cost.Add a gate in CI: helm template | gzip | wc -c alert if the size exceeds 700 KB.
See Lesson 7 Module 6 Release storage, size limits and cleanup.
Error: UPGRADE FAILED: … Apply failed with 1 conflict: conflict with "kubectl-edit" using apps/v1: .spec.replicas
Symptom: A release newly installed with Helm 4 (SSA by default) fails after someone kubectl edit/kubectl scale, or after an HPA or another controller changes the same field, the upgrade fails. Releases upgraded from Helm 3 to Helm 4 still use client-side three-way merge, so they do not report this; instead the field is silently overwritten or kept.
Root cause: In SSA, every field has a “manager” (managedFields). Helm submits the manifest under its own field manager; if a field is set to a different value by another manager, the API server rejects it and reports a conflict, unless force is used.
kubectl get deploy myapp -n lab8-m1 --show-managed-fields -o yaml | yq '.metadata.managedFields[]|{"manager":.manager,"op":.operation}'
helm get metadata myapp -n lab8-m1
{"manager": "helm", "op": "Apply"}
{"manager": "kubectl-edit", "op": "Update"}
# Confirm that the value in Git is authoritative, then force-reclaim the field
helm upgrade myapp ./myapp -n lab8-m1 --force-conflicts
# If the field should be managed by another controller (HPA manages replicas), remove that field from the template
# {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} {{- end }}
kubectl edit changes are forbidden (RBAC + GitOps); drift is corrected through PRs.replicas.--server-side=true), run a pass in a pre-production environment first to find conflicts.See Lesson 7 Module 4 Server-side apply (SSA) and field ownership conflicts,Module 7 Helm 3 to Helm 4 migration.
Click the operations in order and watch how each revision Secret’s status changes, and what the next command returns. The simulation logic matches the Helm 4 source: pending is a pessimistic lock, a failed upgrade writes failed, and rollback creates a new revision.
lab and ~/helmlab/lab8/myapp. Each lab uses its own namespace and is cleaned up right after.cd ~/helmlab/lab8 helm upgrade --install myapp ./myapp -n lab8-m1 --create-namespace --wait helm upgrade myapp ./myapp -n lab8-m1 --set image.tag=does-not-exist --wait --timeout 2m & sleep 8; kill -9 $! # simulate a CI runner being reclaimed helm history myapp -n lab8-m1
REVISION STATUS DESCRIPTION 1 deployed Install complete 2 pending-upgrade Preparing upgrade
helm upgrade myapp ./myapp -n lab8-m1 --wait
Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress
pgrep -fa 'helm upgrade' || echo "no running helm" helm rollback myapp 1 -n lab8-m1 --wait && helm history myapp -n lab8-m1 --max 3
Rollback was a success! Happy Helming! 2 failed … (or superseded, depending on version) 3 deployed Rollback to 1
helm uninstall myapp -n lab8-m1; kubectl delete ns lab8-m1kubectl create ns lab8-m1b helm template myapp ./myapp -n lab8-m1b | kubectl apply -n lab8-m1b -f - # simulate “previously managed with kubectl” helm install myapp ./myapp -n lab8-m1b
Error: INSTALLATION FAILED: unable to continue with install: ServiceAccount "myapp" in namespace "lab8-m1b" exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: missing key "meta.helm.sh/release-name": must be set to "myapp"; …
helm template the output already has the managed-by: Helm label, so only the missing annotation is reported; the first object type checked may differ.
helm install myapp ./myapp -n lab8-m1b --take-ownership
kubectl get deploy myapp -n lab8-m1b -o jsonpath='{.metadata.annotations.meta\.helm\.sh/release-name}{"\n"}'myapp
helm uninstall myapp -n lab8-m1b; kubectl delete ns lab8-m1bcp -r myapp myapp-m1c helm upgrade --install m1c ./myapp-m1c -n lab8-m1c --create-namespace --wait # add a new label to selectorLabels sed -i '/define "myapp.selectorLabels"/a tier: web' myapp-m1c/templates/_helpers.tpl helm upgrade m1c ./myapp-m1c -n lab8-m1c
Error: UPGRADE FAILED: … Deployment.apps "m1c-myapp" is invalid: spec.selector: Invalid value: …: field is immutable
sed -i '/^tier: web$/d' myapp-m1c/templates/_helpers.tpl helm upgrade m1c ./myapp-m1c -n lab8-m1c --wait && helm history m1c -n lab8-m1c --max 3
helm uninstall m1c -n lab8-m1c; kubectl delete ns lab8-m1c; rm -rf myapp-m1chelm upgrade --install m1d ./myapp -n lab8-m1d --create-namespace --wait helm get metadata m1d -n lab8-m1d | grep -i apply # Helm 4 fresh install: server-side kubectl scale deploy m1d-myapp -n lab8-m1d --replicas=3 # another field manager changed replicas helm upgrade m1d ./myapp -n lab8-m1d --set config.greeting=hi
Error: UPGRADE FAILED: … Apply failed with 1 conflict: conflict with "kubectl" using apps/v1: .spec.replicas
kubectl scale Updated via the scale subresource; the manager name may appear as kubectl or kubectl-scale; if your environment produces no conflict (for example, because the release uses client-side merge), observe --show-managed-fields is enough.
helm upgrade m1d ./myapp -n lab8-m1d --set config.greeting=hi --force-conflicts --wait
kubectl get deploy m1d-myapp -n lab8-m1d -o jsonpath='{.spec.replicas}{"\n"}'1
helm uninstall m1d -n lab8-m1d; kubectl delete ns lab8-m1dNo verified video specifically covering Helm release status and pending-upgrade troubleshooting was found. Below is a 3-minute storyboard you can record yourself:
helm upgrade --wait is running, on the right kubectl get secret -l owner=helm -L status -w live shows v2 = pending-upgrade.helm rollback v3=deployed is created and pending clears; compare with the risk of the “delete Secret” approach.kubectl scale After that, upgrade reports an SSA conflict; show managedFields, then use --force-conflicts. Recap: the lock, ownership, and field managers.-f files (left to right) → --set*; maps are deep-merged,lists are replaced as a whole; schema validation then runs.helm template --debug,--show-only,helm get values --all to locate problems.Enter a keyword (such as nil pointer,YAML,schema,reuse) to filter; click a row to jump to details.
Error: INSTALLATION FAILED: YAML parse error on myapp/templates/deployment.yaml: error converting YAML to JSON: yaml: line 24: did not find expected key
Symptom: Template rendering succeeds, but the rendered output is not valid YAML. Common variants: mapping values are not allowed in this context,could not find expected ':',found character that cannot start any token.
Root cause: Helm first runs the Go template to get plain text, then splits it by --- and parses each piece as YAML. The most common cause is toYaml a wrong indentation after (using indent instead of nindent, or the wrong number of indent spaces),{{- eats the newline, or a value containing a colon or asterisk is not quote. The line number in the error refers to the rendered file, not the template source file.
helm template myapp ./myapp --debug --show-only templates/deployment.yaml 2>&1 | cat -n | sed -n '15,30p' # --debug still prints the rendered output when YAML parsing fails, so you can compare line numbers
22 resources:
23 limits:
24 cpu: 500m ← toYaml output is not indented under limits
resources:
{{- toYaml .Values.resources | nindent 10 }}
# always quote string values:
- name: GREETING
value: {{ .Values.config.greeting | quote }}
{{- toYaml X | nindent N }}: {{- trim the preceding newline,nindent add a newline before indenting.helm lint --strict and helm template | kubeconform -strict.See Lesson 2 Module 2 Template syntax,Lesson 7 Module 5 Template debugging.
Error: INSTALLATION FAILED: template: myapp/templates/service.yaml:12:21: executing "myapp/templates/service.yaml" at <.Values.service.port>: nil pointer evaluating interface {}.port
Symptom: The user’s values file does not set service: (or sets it as Service:,svc:), or uses --reset-values/new chart removed a parent key.
Root cause: Go templates access .Values.service.port when .Values.service is nil, then access .port is a field access on nil. Only the last level missing (.port does not error; it just renders empty. Only a missing middle level causes a nil pointer.
helm template myapp ./myapp -f values-prod.yaml --debug 2>&1 | head -5 yq '.service' values-prod.yaml; helm show values ./myapp | yq '.service' helm get values myapp -n lab8-m2 --all | yq '.service' # the “merged” values of the installed release
# Template-side defense: check each level, or use dig to read nested keys that may be missing
port: {{ (.Values.service | default dict).port | default 80 }}
port: {{ dig "service" "port" 80 .Values.AsMap }}
# or wrap the whole block in with
{{- with .Values.service }}
port: {{ .port }}
{{- end }}
{}), and use values.schema.json’s required constraint to require parent keys (#16).additionalProperties: false to catch them.See Lesson 2 Module 4 conditionals, loops and values design.
Error: INSTALLATION FAILED: execution error at (myapp/templates/secret.yaml:9:21): redis.password is required
Symptom: The chart author uses required or fail to force a user to supply a value, and the user does not; in CI this often happens when a secret comes from a pipeline variable whose name is misspelled.
Root cause: This is an intentional failure: {{ required "redis.password is required" .Values.redis.password }} returns an error when the value is empty. Note that helm lint lint downgrades it to a warning by default (source comment “Don’t fail on missing required values when linting”), so passing lint does not mean the install will succeed.
grep -rn 'required\|fail ' myapp/templates/ | head helm template myapp ./myapp -f values-prod.yaml --set redis.password=dummy >/dev/null && echo render-ok
# Do not put secrets in values files: read them from CI secrets / Key Vault and pass them via --set-file or a temporary -f file helm upgrade --install myapp ./myapp -n lab8-m2 --set-string redis.password="$REDIS_PASSWORD" # Better: the chart supports existingSecret, with External Secrets creating the Secret
redis.password is required (or set redis.existingSecret).required render secrets directly into a ConfigMap in --set values are stored in the release Secret (helm get values readable).Error: INSTALLATION FAILED: values don't meet the specifications of the schema(s) in the following chart(s): myapp: - at '/replicaCount': got string, want integer
Symptom: Passing --set-string replicaCount=3, or writing in the values file replicaCount: "3"; or missing required keys in the schema; or adding additionalProperties: false keys that are forbidden.
Root cause: After merging values and before rendering, Helm uses the chart’s (and each subchart’s) values.schema.json schema to validate the final values. install, upgrade, lint and template all run this validation.
jq '.properties.replicaCount' myapp/values.schema.json helm template myapp ./myapp -f values-prod.yaml >/dev/null helm get values myapp -n lab8-m2 -o json | jq '.replicaCount|type'
helm upgrade myapp ./myapp -n lab8-m2 --set replicaCount=3 # --set parses 3 as an integer # Emergency only (not recommended): --skip-schema-validation skips validation
required, and run it against each environment’s values file in CI helm lint -f.$schema to explicitly declare the draft version (for example https://json-schema.org/draft/2020-12/schema), so different tools do not interpret it under different drafts.Error: UPGRADE FAILED: failed to create resource: Deployment in version "v1" cannot be handled as a Deployment: json: cannot unmarshal number into Go struct field EnvVar.spec.template.spec.containers.env.value of type string
Symptom: Two forms: ① no error, but the wrong version is deployed —--set image.tag=1.10 is parsed as the float 1.1; ② an environment variable value --set env.PORT=8080 renders as a number, and the API server rejects it (EnvVar.value must be a string).
Root cause:--set infers types (number, boolean, null); unquoted 1.10,on/yes values such as these are also parsed as numbers or booleans. In templates without quote the quote function, numbers are output unchanged.
helm get values myapp -n lab8-m2 -o json | jq '.image.tag, (.image.tag|type)' helm get manifest myapp -n lab8-m2 | grep -n 'image:'
1.1
"number"
image: "myapp:1.1"
helm upgrade myapp ./myapp -n lab8-m2 --set-string image.tag=1.10
# In templates, consistently quote / toString string fields:
# image: "{{ .Values.image.repository }}:{{ .Values.image.tag | toString }}"
# value: {{ .value | quote }}
image.tag defined as "type": "string", so the #16 validation catches it earlier.-f values-ci.yaml (explicit quotes) or --set-string; even better, deploy images by digest (image.digest).$ helm upgrade myapp ./myapp-0.2.0 -n lab8-m2 --reuse-values
Error: UPGRADE FAILED: template: myapp/templates/deployment.yaml:48:28: executing "myapp/templates/deployment.yaml" at <.Values.metrics.enabled>: nil pointer evaluating interface {}.enabled
Symptom: The new chart version added a metrics: block, and using --reuse-values upgrade reports a nil pointer, while a fresh install works.
Root cause:--reuse-values means “use the last release’s final merged values, then merge command-line overrides”, and ignore the new chart’s values.yaml defaults. A newly added key does not exist in the previous release → nil. Conversely,--reset-values will drop the values previously passed via --set flags.
helm get values myapp -n lab8-m2 # user-supplied values (previous revision) helm show values ./myapp-0.2.0 | yq '.metrics' diff <(helm show values ./myapp-0.1.0) <(helm show values ./myapp-0.2.0)
helm upgrade myapp ./myapp-0.2.0 -n lab8-m2 --reset-then-reuse-values # new chart defaults + last user values + this run’s overrides # Best: all values come from the values file in Git and are passed in full every time helm upgrade myapp ./myapp-0.2.0 -n lab8-m2 -f values/common.yaml -f values/prod.yaml
dig/default dict for compatibility (#14).See Lesson 1 Module 4,Lesson 6 Module 2 layered values and multiple environments.
$ helm get manifest myapp -n lab8-m2 | yq 'select(.kind=="Deployment").spec.template.spec.containers[0].env' - name: LOG_LEVEL value: debug (REDIS_HOST and APP_VERSION in common.yaml are both gone)
Symptom: common.yaml defines 5 environment variables and prod.yaml only wants to “add one”, but only the one in prod.yaml is left, and the app cannot connect to Redis.
Root cause: Helm’s values merge deep-merges maps, and replaces lists as a whole (the latter overrides the former). --set env[0].name=… also replaces the whole list.
helm template myapp ./myapp -f values/common.yaml -f values/prod.yaml | yq 'select(.kind=="Deployment").spec.template.spec.containers[0].env' helm get values myapp -n lab8-m2 --all | yq '.env'
# Design lists that must be merged as maps, and have the template convert them to lists
env:
REDIS_HOST: myapp-redis
APP_VERSION: "1.1"
# prod.yaml contains only differences
env:
LOG_LEVEL: info
# template
env:
{{- range $k, $v := .Values.env }}
- name: {{ $k }}
value: {{ $v | quote }}
{{- end }}
extraEnv a list as an append point.Error: INSTALLATION FAILED: parse error at (myapp/templates/configmap.yaml:9): function "toYml" not defined
Symptom: Misspelled function names (toYml,nindnet), or using a function that exists only in newer Helm (for example, newer Sprig functions or custom template functions from Helm 4 plugins), which fails on older Helm versions or on machines without the plugin installed. Similar cases: unexpected "}" in operand,unexpected EOF (missing {{ end }}).
Root cause: Templates are parsed before execution; function names must exist in the function table (Go built-ins + Sprig + Helm custom functions such as include/tpl/required/lookup/toYaml). Parse errors have nothing to do with values; they fail for any value.
helm lint myapp helm version --short; grep -n 'helm.sh/\|kubeVersion' myapp/Chart.yaml
Correct the spelling; if the chart depends on a function that exists only in a certain Helm version, pin the Helm version in the README and CI, and avoid plugin-provided functions in templates (plugins are not necessarily present on every deploy side, such as Argo CD).
Before committing helm lint; use the Helm language server (helm-ls) in your editor for function completion.
Error: INSTALLATION FAILED: template: myapp/templates/deployment.yaml:31:25: executing "myapp/templates/deployment.yaml" at <.Values.image.repository>: can't evaluate field Values in type interface {}
Symptom: Inside range .Values.sidecars or with .Values.service block, accessing .Values,.Release.Name or calling include "myapp.fullname" . fails.
Root cause:range range and with with change . the dot (the current context) to the current element. Inside the block, .Values .Values is actually “element.Values”. The root context is stored in $ .
helm template myapp ./myapp --debug 2>&1 | grep -m1 'executing' sed -n '25,35p' myapp/templates/deployment.yaml
{{- range .Values.sidecars }}
- name: {{ .name }}
image: "{{ $.Values.image.repository }}:{{ .tag }}"
{{- include "myapp.labels" $ | nindent 2 }}
{{- end }}
Always use $ to access globals; when you need both the root context and a local value, use dict "root" $ "item" . to pass them to a named template.
$ helm upgrade myapp ./myapp -n lab8-m2 --set config.greeting=hi Release "myapp" has been upgraded. Happy Helming! $ kubectl get pod -n lab8-m2 # AGE is still 2 days ago; the app still reads the old config
Symptom: Only a value in the ConfigMap was changed and the release revision increased, but Pods were not recreated; config injected as environment variables is not hot-reloaded.
Root cause: A Deployment rolls out only when spec.template changes. A ConfigMap content change does not alter the Pod template. Helm does not restart workloads automatically.
helm diff upgrade myapp ./myapp -n lab8-m2 --set config.greeting=hi # only the ConfigMap differs kubectl rollout history deploy/myapp -n lab8-m2
# Put a checksum of the config content in a Pod template annotation
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
rollme: {{ randAlphaNum 5 }} annotations that change on every run — they restart Pods on every upgrade and leave GitOps permanently OutOfSync (#46).See Lesson 2 Module 8,Lesson 6 Module 7 zero-downtime upgrades.
$ helm get values myapp -n lab8-m2
auth:
password: s3cret ← written at the top level
$ kubectl get sts myapp-redis -n lab8-m2 -o yaml | grep -A2 resources
resources: {}
Symptom: The umbrella chart depends on the redis subchart; users put the subchart’s values at the top level, or used the wrong key name (the dependency set alias).
Root cause: The parent chart only passes Keyed by the subchart name (or alias) , the block of values is passed to the subchart; global values under it are also passed to all subcharts. A subchart cannot read other values from the parent chart. condition: redis.enabled A typo here means the subchart may not even be rendered.
yq '.dependencies' myapp/Chart.yaml helm template myapp ./myapp | grep -c 'kind: StatefulSet' helm show values myapp/charts/redis-*.tgz | head -30
# Chart.yaml
dependencies:
- name: redis
version: "0.x.x"
repository: oci://registry-1.docker.io/cloudpirates
alias: cache
condition: cache.enabled
# values.yaml — use the alias as the key
cache:
enabled: true
auth:
password: "" # provided by existingSecret
global:
imageRegistry: myacr.azurecr.io
In the parent chart's values.yaml, document the most commonly used keys for each subchart; to export values from a subchart to the parent, use import-values.
See Lesson 2 Module 6 Dependencies, subcharts and library charts.
$ helm upgrade myapp ./myapp -n lab8-m2 $ kubectl logs deploy/myapp -n lab8-m2 | tail -1 redis.exceptions.AuthenticationError: invalid username-password pair or user is disabled.
Symptom: The chart uses randAlphaNum 16 to generate the password, so the Secret is rewritten on every upgrade, but Redis's data directory still uses the old password; or uses lookup to reuse an existing Secret, and in helm template,--dry-run=client, Argo CD, lookup always returns an empty map, so a new password is generated again.
Root cause: The template is re-executed on every render randAlphaNum. lookup Only when Helm runs against a cluster (install/upgrade,--dry-run=server) does lookup query the API; offline rendering returns empty.
helm history myapp -n lab8-m2 --max 3
kubectl get secret myapp-redis -n lab8-m2 -o jsonpath='{.metadata.resourceVersion}' # changes on every upgrade
helm template myapp ./myapp | grep -A3 'kind: Secret'
{{- $existing := lookup "v1" "Secret" .Release.Namespace (printf "%s-redis" (include "myapp.fullname" .)) }}
{{- $pw := "" }}
{{- if $existing }}{{- $pw = index $existing.data "password" | b64dec }}{{- else }}{{- $pw = randAlphaNum 24 }}{{- end }}
# and add “helm.sh/resource-policy”: keep to the Secret so it is not deleted on uninstall
existingSecret, with the Secret supplied by External Secrets / Key Vault / Secrets Manager (Lessons 3, 4, 6).See Lesson 6 Module 3 Secrets: helm-secrets, SOPS and External Secrets.
Error: INSTALLATION FAILED: chart requires kubeVersion: >=1.38.0-0 which is incompatible with Kubernetes v1.37.0
Symptom: The chart's Chart.yaml declares kubeVersion constraint that the target cluster does not satisfy; or helm template when rendering offline, the built-in default Kubernetes version is used, so the output differs from the real cluster (.Capabilities.APIVersions.Has returns false, so objects such as Ingress/PDB are skipped).
Root cause: Before rendering, Helm uses discovery to get the cluster version and API list, and fills them into .Capabilities; offline rendering uses defaults. Cloud vendor version numbers often carry a suffix (v1.37.1-eks-…), and a constraint that omits -0 the pre-release suffix causes a mismatch.
kubectl version -o json | jq -r .serverVersion.gitVersion yq '.kubeVersion' myapp/Chart.yaml helm template myapp ./myapp --kube-version 1.37.0 --api-versions monitoring.coreos.com/v1 | grep -c ServiceMonitor
">=1.30.0-0" (with -0 to accept the cloud vendor's pre-release suffix).--kube-version and --api-versions, or use --dry-run=server to render against the real cluster.Use .Capabilities when checking, also provide a values switch (such as serviceMonitor.enabled), so GitOps tools (offline rendering) also get a deterministic result.
See Lesson 2 Module 1 Chart.yaml,Lesson 1 Module 7 helm template.
Pick the symptom you see to step through the diagnostic commands and conclusions; each conclusion can jump to the matching issue details.
lab. Work in ~/helmlab/lab8 .cd ~/helmlab/lab8 && cp -r myapp m2a sed -i 's/toYaml .Values.resources | nindent 12/toYaml .Values.resources | indent 6/' m2a/templates/deployment.yaml helm template t ./m2a --set resources.limits.cpu=500m
Error: YAML parse error on m2a/templates/deployment.yaml: error converting YAML to JSON: yaml: line 4x: did not find expected key
If your helm create version's resources line is not indented by 12, first grep -n 'toYaml .Values.resources' m2a/templates/deployment.yaml check it, then replace.
helm template t ./m2a --set resources.limits.cpu=500m --debug --show-only templates/deployment.yaml 2>/dev/null | grep -n -B2 -A2 'cpu'
nindent 12 and rendering succeeds. Cleanup: rm -rf m2acp -r myapp m2b printf 'service: null\n' > null-svc.yaml helm template t ./m2b -f null-svc.yaml 2>&1 | head -2
Error: template: m2b/templates/service.yaml:8:18: executing "m2b/templates/service.yaml" at <.Values.service.type>: nil pointer evaluating interface {}.typeSetting a key to null removes it from the merged result; it is often used to “remove a default”, and is also a common source of nil pointers.
sed -i 's/{{ .Values.service.type }}/{{ dig "service" "type" "ClusterIP" .Values.AsMap }}/' m2b/templates/service.yaml
helm template t ./m2b -f null-svc.yaml 2>&1 | head -2If other lines still reference .Values.service.port, the next nil pointer will be reported elsewhere. This shows that “defending every site” is worse than “default values for parent keys in values.yaml + a schema constraint”.
rm -rf m2b null-svc.yamlcp -r myapp m2c
cat > m2c/values.schema.json <<'EOF'
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": ["image", "replicaCount"],
"properties": {
"replicaCount": { "type": "integer", "minimum": 1 },
"image": { "type": "object", "required": ["repository", "tag"],
"properties": { "tag": { "type": "string" } } }
}
}
EOF
helm template t ./m2c --set-string replicaCount=2 >/dev/null
helm template t ./m2c --set image.tag=1.10 >/dev/nullError: values don't meet the specifications of the schema(s) in the following chart(s): m2c: - at '/replicaCount': got string, want integer Error: values don't meet the specifications of the schema(s) in the following chart(s): m2c: - at '/image/tag': got number, want string
helm template t ./m2c --set replicaCount=2 --set-string image.tag=1.10 | grep 'image:'
image: "myapp:1.10"
rm -rf m2chelm upgrade --install m2d ./myapp -n lab8-m2 --create-namespace --set config.greeting=hey --wait
cp -r myapp m2d-v2 && sed -i 's/^version: .*/version: 0.2.0/' m2d-v2/Chart.yaml
printf 'metrics:\n enabled: false\n' >> m2d-v2/values.yaml
sed -i '0,/annotations:/s//annotations:\n metrics-enabled: {{ .Values.metrics.enabled | quote }}/' m2d-v2/templates/deployment.yaml
helm upgrade m2d ./m2d-v2 -n lab8-m2 --reuse-values 2>&1 | tail -1Error: UPGRADE FAILED: template: … at <.Values.metrics.enabled>: nil pointer evaluating interface {}.enabledThe sed insertion point depends on helm create the generated deployment.yaml; if the insertion point is not under the Pod template metadata, add it manually under template.metadata.annotations instead.
helm upgrade m2d ./m2d-v2 -n lab8-m2 --reset-then-reuse-values --wait helm get values m2d -n lab8-m2 --all | grep -E 'greeting|enabled'
greeting: hey enabled: false
helm uninstall m2d -n lab8-m2; kubectl delete ns lab8-m2; rm -rf m2d-v2--debug --show-only to locate them.index.yaml ) + local cache, which requires helm repo add/update) and OCI (no index; pulled by oci://host/path/chart:version or @sha256: directly, with credentials in registry/config.json).Enter a keyword (such as index,401,digest,kubelogin) to filter; click a row to jump to details.
Error: looks like "https://charts.example.com" is not a valid chart repository or cannot be reached: failed to fetch https://charts.example.com/index.yaml : 404 Not Found
Symptom:helm repo add fails. Common causes: the URL is missing its path (the GitHub Pages /charts), adding an OCI address as an HTTP repository (OCI registries have no index.yaml), private repositories needing authentication, corporate proxy/certificate interception (in which case the cause is x509: certificate signed by unknown authority).
Root cause: An HTTP repository is simply a static site that serves index.yaml ; repo add immediately downloads the index to verify it. An OCI registry cannot be helm repo add, so use oci:// directly as the reference.
curl -sSI https://charts.example.com/index.yaml | head -1 curl -s https://stefanprodan.github.io/podinfo/index.yaml | head -3 helm env | grep -E 'REPOSITORY_(CONFIG|CACHE)'
helm repo add podinfo https://stefanprodan.github.io/podinfo # correct HTTP repository helm show chart oci://ghcr.io/stefanprodan/charts/podinfo --version 6.17.0 # OCI: no repo add needed helm repo add private https://charts.corp.example --username "$U" --password-stdin <<< "$P" helm repo add corp https://charts.corp.example --ca-file /etc/ssl/corp-ca.pem
For new projects, prefer OCI (same registry, permissions and scanning as images); if an HTTP repository must be kept, host it with chart-releaser or object storage, and monitor index.yaml availability.
See Lesson 1 Module 2, Module 6 OCI repositories and chart distribution.
Error: chart "myapp" matching 1.4.0 not found in corp index. (try 'helm repo update'): no chart version found
Symptom: Chart 1.4.0 was just published, and installation fails on the deploy machine/CI; or a pre-release version is specified 1.4.0-rc.1 but the constraint does not allow it.
Root cause: Lookup in an HTTP repository is based entirely on the locally cached index ($HELM_CACHE_HOME/repository/corp-index.yaml) is not refreshed automatically. A version constraint (such as ~1.4) does not match pre-release versions by default; you need --devel or write -0 in the constraint.
helm search repo corp/myapp --versions --devel | head yq '.entries.myapp[].version' "$(helm env HELM_REPOSITORY_CACHE)/corp-index.yaml" | head
helm repo update corp helm upgrade --install myapp corp/myapp --version 1.4.0 -n prod helm upgrade --install myapp corp/myapp --version 1.4.0-rc.1 --devel -n staging
In CI, always run helm repo update before installing; or switch to OCI (resolved directly by tag, with no local index cache problem). In the release process, account for CDN caching between “push chart” and “deploy” (GitHub Pages may lag by a few minutes).
See Lesson 5 Module 2 Publishing charts: chart-releaser and OCI.
$ helm dependency build ./myapp Error: no repository definition for https://stefanprodan.github.io/podinfo. Please add the missing repos via 'helm repo add'
Similar cases: the lock file (Chart.lock) is out of sync with the dependencies file (Chart.yaml). Please update the dependencies with 'helm dependency update'.
Symptom: Works fine on a developer machine with helm dependency build ; fails on a clean CI runner, or the dependency version in Chart.yaml was changed but Chart.lock was not updated.
Root cause: For HTTP repository dependencies,dependency build/update the machine's repositories.yaml must already contain a repository with the matching URL (the name does not matter, but the URL must match). OCI dependencies (repository: oci://…) do not need repo add, only registry credentials. build Dependencies are pulled strictly from Chart.lock; if the lock and Chart.yaml disagree, the build is refused.
yq '.dependencies[]|[.name,.version,.repository]' myapp/Chart.yaml helm repo list cat myapp/Chart.lock
helm repo add podinfo https://stefanprodan.github.io/podinfo helm dependency build ./myapp # pull exactly as pinned in Chart.lock (use this in CI) helm dependency update ./myapp # re-resolve versions and update Chart.lock (for developers; commit the result to Git)
build rather than update, to ensure reproducibility.helm registry login.Error: INSTALLATION FAILED: an error occurred while checking for chart dependencies. You may need to run 'helm dependency build' to fetch missing dependencies: found in Chart.yaml, but missing in charts/ directory: redis
Symptom: Installing a local-directory chart directly from Git; charts/ is ignored by .gitignore (which is correct), but the dependencies were not built before deployment. It also appears in homemade deploy scripts other than Argo CD.
Root cause: When installing a local chart, Helm checks dependencies whether each dependency (whose condition is met) listed in charts/ exists. Packaging (helm package) produces a .tgz that already contains the dependencies, so this problem does not occur.
ls myapp/charts/; helm dependency list ./myapp
NAME VERSION REPOSITORY STATUS redis 0.x.x oci://registry-1.docker.io/cloudpirates missing
helm dependency build ./myapp && helm upgrade --install myapp ./myapp -n prod # or in one step: helm upgrade --install myapp ./myapp -n prod --dependency-update
In the pipeline, separate “publish” from “deploy”: CI packages the chart (with dependencies) and pushes it to OCI, and CD only deploys immutable chart versions.
$ helm registry login oci://myacr.azurecr.io/helm --username 00000000-0000-0000-0000-000000000000 --password-stdin Error: … (login fails, or the credentials are saved under the wrong key, and later pushes still return 401)
Symptom: Scripts from the Helm 3 era used oci:// prefix or an address with a path; after upgrading to Helm 4, the login step fails, or login “succeeds” but push/pull is still unauthorized.
Root cause: The Helm 4 change overview states clearly: helm registry login accepts only domain names (host[:port]), not full URLs. Credentials are stored by host in $HELM_REGISTRY_CONFIG (by default ~/.config/helm/registry/config.json), compatible with Docker's config.json format.
helm env HELM_REGISTRY_CONFIG jq '.auths|keys' "$(helm env HELM_REGISTRY_CONFIG)"
[ "myacr.azurecr.io" ]
helm registry login myacr.azurecr.io --username 00000000-0000-0000-0000-000000000000 \ --password-stdin <<< "$(az acr login -n myacr --expose-token --query accessToken -o tsv)" helm push myapp-0.1.0.tgz oci://myacr.azurecr.io/helm
When migrating to Helm 4, grep all scripts for registry login oci://; put login and push in the same job, so the credential file path is not lost between jobs.
See Lesson 3 Module 2 ACR as an OCI chart repository,Lesson 7 Module 7 Helm 3 to Helm 4 migration.
Error: failed to perform "Push" on destination: PUT "https://myacr.azurecr.io/v2/helm/myapp/manifests/0.1.0": response status code 401: unauthorized: authentication required
Symptom: In CI, the first few jobs push successfully, and jobs a few hours later get 401; or pull succeeds and push returns 403.
Root cause:① az acr login --expose-token The ACR refresh token obtained lasts about 3 hours (per Microsoft Learn); after it expires, the credentials in config.json become invalid; ② the identity only has AcrPull but not AcrPush (or the Repository-level role in ABAC mode); ③ the ECR get-login-password token is valid for 12 hours; ④ pushes went to a namespace on Docker Hub that belongs to someone else.
az acr check-health -n myacr --yes 2>&1 | tail -3 az role assignment list --assignee "$CLIENT_ID" --scope "$(az acr show -n myacr --query id -o tsv)" -o table aws ecr describe-repositories --repository-names charts/myapp --region ca-central-1
# log in again before each job's push (OIDC federated identity → short-lived token) az acr login -n myacr --expose-token --query accessToken -o tsv | helm registry login myacr.azurecr.io --username 00000000-0000-0000-0000-000000000000 --password-stdin aws ecr get-login-password --region ca-central-1 | helm registry login --username AWS --password-stdin 123456789012.dkr.ecr.ca-central-1.amazonaws.com
CI gets cloud identity via OIDC and stores no long-term passwords; separate the push identity from the cluster pull identity (push: AcrPush; cluster/Argo CD: AcrPull).
See Lesson 3 Module 2,Lesson 4 Module 2 ECR as an OCI chart repository.
$ helm push myapp-1.2.0+build.7.tgz oci://localhost:5001/charts --plain-http Pushed: localhost:5001/charts/myapp:1.2.0_build.7 $ crane ls localhost:5001/charts/myapp # external tools see 1.2.0_build.7
Symptom: SemVer build metadata (+ ) suffix appears in OCI as _; other tools (Argo CD version constraints, image scanning policies, cleanup scripts) look up + fail, or treat 1.2.0_build.7 as non-SemVer and ignore it.
Root cause: OCI tags do not allow + characters. When pushing, Helm replaces + with _, and converts it back to + (source code reference.go and client.go). In addition, SemVer specifies that build metadata does not take part in version precedence comparison, so 1.2.0+build.7 and 1.2.0+build.8 are treated as the same version.
helm show chart oci://localhost:5001/charts/myapp --version 1.2.0+build.7 --plain-http | grep ^version
Do not use build metadata to distinguish different content in chart versions; increment the version number whenever the content changes (1.2.1), or use a pre-release version 1.2.1-rc.7. In Helm commands you can still write +, but convert it in other tools.
Chart versions are immutable: never push different content under the same version (enable tag immutability/locking on the registry side, for example ACR's --write-enabled false, and ECR's tag immutability).
Error: INSTALLATION FAILED: chart reference digest mismatch: sha256:9b1f… is not sha256:4c1e…
Symptom: Installing by digest with Helm 4 (oci://…/myapp:0.1.0@sha256:…), but someone re-pushed different content under the same tag; or the digest was copied incorrectly. Similar cases: chart reference and version mismatch: 0.2.0 is not 0.1.0 (the tag in the reference and --version do not match).
Root cause: Helm 4 supports installing by manifest digest and verifies the actual digest after resolution; on a mismatch it refuses to install. This is exactly the point of digest pinning: preventing supply-chain problems caused by overwritten tags.
helm pull oci://localhost:5001/charts/myapp --version 0.1.0 --plain-http -d /tmp/lab8/pull 2>&1 | grep Digest crane digest localhost:5001/charts/myapp:0.1.0 --insecure
First find out why the content under the same tag changed (who pushed it, whether CI published twice); once the new content is trusted, update the digest in the deployment reference; if it is not trusted, roll back to the artifact matching the original digest.
version + digest; enable tag immutability on the registry.Error: … response status code 404: name unknown: The repository with name 'charts/myapp' does not exist in the registry with id '123456789012'
Symptom: On ACR you can push directly to any path; after switching to ECR, helm push the push fails.
Root cause: ECR does not create repositories automatically (unless a repository creation template is configured). helm push myapp-0.1.0.tgz oci://<acct>.dkr.ecr.<region>.amazonaws.com/charts pushes into the repository charts/myapp——the chart name is appended to the end of the path, so what needs to be created in advance is charts/myapp, not charts.
aws ecr describe-repositories --region ca-central-1 --query 'repositories[].repositoryName'
aws ecr create-repository --repository-name charts/myapp --region ca-central-1 \ --image-tag-mutability IMMUTABLE --image-scanning-configuration scanOnPush=true helm push myapp-0.1.0.tgz oci://123456789012.dkr.ecr.ca-central-1.amazonaws.com/charts
Manage ECR repositories with Terraform (name = chart path + chart name), and configure lifecycle policies to clean up old versions.
Error: kubernetes cluster unreachable: Get "https://myaks-dns-xxxx.hcp.canadacentral.azmk8s.io:443/version": getting credentials: exec: executable kubelogin not found It looks like you are trying to use a client-go credential plugin that is not installed.
Symptom: After AKS enables Microsoft Entra ID integration, on the CI runner az aks get-credentials the generated kubeconfig uses the exec plugin kubelogin, but the runner does not have it installed or has not converted the login mode.
Root cause: Helm reads kubeconfig with client-go; an exec-type user needs a local executable. In non-interactive environments, kubelogin must also be set to azurecli,workloadidentity or spn mode; otherwise it tries device-code login and hangs.
kubectl config view --minify -o jsonpath='{.users[0].user.exec.command} {.users[0].user.exec.args}{"\n"}'
which kubelogin || echo missing
az aks install-cli # install kubectl and kubelogin az aks get-credentials -g rg-helm-lab -n aks-helm-lab --overwrite-existing kubelogin convert-kubeconfig -l azurecli # use when az login (OIDC) has already been done in CI helm list -A
Use the official Azure task/Action in pipelines (it handles kubelogin), get identity through workload identity federation, and give the deploy identity the minimal AKS RBAC role (namespace-scoped).
See Lesson 3 Module 6 Pipeline deployment to AKS,Module 7 Cloud troubleshooting in practice.
Error: kubernetes cluster unreachable: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1alpha1" --- Error: kubernetes cluster unreachable: the server has asked for the client to provide credentials
Symptom: Case 1: a kubeconfig generated by a very old AWS CLI; the newer client-go (built into Helm 4) no longer supports v1alpha1. Case 2: the token is valid, but this IAM identity has no access entry in EKS / aws-auth mapping.
Root cause: EKS kubeconfig uses aws eks get-token to generate short-lived tokens; on the cluster side, access entries map IAM principals to Kubernetes identities and access policies. The role CI assumes via OIDC differs from the developer's role, and it is often left out of the configuration.
aws --version; aws sts get-caller-identity
kubectl config view --minify -o jsonpath='{.users[0].user.exec.apiVersion}{"\n"}'
aws eks list-access-entries --cluster-name eks-helm-lab --region ca-central-1
aws eks update-kubeconfig --name eks-helm-lab --region ca-central-1 # newer CLI generates v1beta1 aws eks create-access-entry --cluster-name eks-helm-lab --principal-arn arn:aws:iam::123456789012:role/gha-deploy --region ca-central-1 aws eks associate-access-policy --cluster-name eks-helm-lab --principal-arn arn:aws:iam::123456789012:role/gha-deploy \ --policy-arn arn:aws:eks::aws:cluster-access-policy/AmazonEKSEditPolicy --access-scope type=namespace,namespaces=myapp --region ca-central-1
Manage access entries with Terraform; grant the deploy role only namespace-scoped policies.
See Lesson 4 Module 6 Pipeline deployment to EKS,Module 7 Cloud troubleshooting in practice.
Error: INSTALLATION FAILED: 1 error occurred: * Internal error occurred: failed calling webhook "mservice.elbv2.k8s.aws": failed to call webhook: Post "https://aws-load-balancer-webhook-service.kube-system.svc:443/mutate-v1-service?timeout=10s": no endpoints available for service "aws-load-balancer-webhook-service"
Symptom: In the same pipeline, the AWS Load Balancer Controller chart is installed first and the application chart right after; creating the Service/Ingress in the app fails. Or the LBC Pods never become ready because of IAM permission or image pull failures.
Root cause: LBC registers mutating/validating webhooks that intercept creation of Service and Ingress. When the webhook backend (controller Pods) is unavailable, the API server rejects requests according to failurePolicy. Installing LBC with Helm without --wait means that the chart reports “success” while the webhook is still not ready.
kubectl -n kube-system get deploy aws-load-balancer-controller kubectl -n kube-system get endpoints aws-load-balancer-webhook-service kubectl get mutatingwebhookconfigurations | grep elbv2 kubectl -n kube-system logs deploy/aws-load-balancer-controller | tail -20
helm upgrade --install aws-load-balancer-controller eks/aws-load-balancer-controller -n kube-system \ --set clusterName=eks-helm-lab --set serviceAccount.name=aws-load-balancer-controller --wait --timeout 5m # deploy the application chart only after the controller is ready
Deploy platform components (controllers, CRDs, webhooks) and applications in layers: the platform release carries --wait, and the application pipeline depends on the platform layer's health checks; uninstall in reverse order (apps first, then controllers), otherwise the Service finalizer will get stuck.
AADSTS700213: No matching federated identity record found for presented assertion subject 'system:serviceaccount:myapp:myapp-prod'. Check your federated identity credential Subject, Audience and Issuer against the presented assertion.
Symptom: The chart installs successfully and the Pod is Running, but the app fails to access Key Vault. The cause is that the release was renamed (myapp → myapp-prod) or fullnameOverride changes, so the ServiceAccount name changes with it, while the federated credential's subject still has the old name. The AWS equivalent is an SA name mismatch in a Pod Identity association or IRSA trust policy (AccessDenied … AssumeRoleWithWebIdentity).
Root cause: The Workload Identity trust chain is an exact match on “OIDC issuer + subject (system:serviceaccount:<ns>:<sa>)” exact match. By default the chart uses myapp.serviceAccountName a template to generate the SA name (including the release name), whereas the federated credential is static in Terraform/the portal.
kubectl get sa -n myapp -o custom-columns=NAME:.metadata.name,CLIENT:.metadata.annotations.azure\.workload\.identity/client-id
kubectl get pod -n myapp -l app.kubernetes.io/instance=myapp-prod -o jsonpath='{.items[0].spec.serviceAccountName}{" "}{.items[0].metadata.labels.azure\.workload\.identity/use}{"\n"}'
az identity federated-credential list -g rg-helm-lab --identity-name id-myapp --query '[].subject'
# values-prod.yaml: pin the SA name, and include the identity annotation and Pod label
serviceAccount:
create: true
name: myapp
annotations:
azure.workload.identity/client-id: "11111111-2222-3333-4444-555555555555"
podLabels:
azure.workload.identity/use: "true"
Explicitly pin the SA name bound to a cloud identity in values, and review it in the same PR as the Terraform federated credential / Pod Identity association.
See Lesson 3 Module 3 Chart design for Workload Identity and Key Vault,Lesson 4 Module 3 Pod Identity / IRSA.
Start from the command where the error appeared.
localhost:5001,registry:3, no authentication, HTTP) and the kind cluster lab. Cloud platform issues (#31, #34–#38) are not reproduced locally; practise them with the diagnostic commands in the details, in the Lesson 3 and 4 environments.cd ~/helmlab/lab8 && cp -r myapp m3a
cat >> m3a/Chart.yaml <<'EOF'
dependencies:
- name: podinfo
version: "6.17.0"
repository: https://stefanprodan.github.io/podinfo
condition: podinfo.enabled
EOF
printf 'podinfo:\n enabled: true\n' >> m3a/values.yaml
helm template t ./m3a >/dev/nullError: an error occurred while checking for chart dependencies. You may need to run 'helm dependency build' to fetch missing dependencies: found in Chart.yaml, but missing in charts/ directory: podinfo
HELM_REPOSITORY_CONFIG=/tmp/lab8/empty-repos.yaml helm dependency build ./m3a
Error: no repository definition for https://stefanprodan.github.io/podinfo. Please add the missing repos via 'helm repo add'
helm dependency update ./m3a && cat m3a/Chart.lock && ls m3a/charts/ helm template t ./m3a | grep -c 'podinfo'
rm -rf m3a /tmp/lab8/empty-repos.yamlcp -r myapp m3b && sed -i 's/^version: .*/version: 0.3.0+build.7/' m3b/Chart.yaml helm package m3b -d /tmp/lab8 && helm push /tmp/lab8/m3b-0.3.0+build.7.tgz oci://localhost:5001/charts --plain-http curl -s localhost:5001/v2/charts/m3b/tags/list
Pushed: localhost:5001/charts/m3b:0.3.0_build.7
Digest: sha256:7d0e…
{"name":"charts/m3b","tags":["0.3.0_build.7"]}D=$(helm push /tmp/lab8/m3b-0.3.0+build.7.tgz oci://localhost:5001/charts --plain-http 2>&1 | awk '/Digest/{print $2}')
helm install m3b oci://localhost:5001/charts/m3b@$D -n lab8-m3 --create-namespace --plain-http
helm install m3b-bad "oci://localhost:5001/charts/myapp:0.1.0@$D" -n lab8-m3 --plain-http # install myapp:0.1.0 using m3b's digestNAME: m3b … STATUS: deployed Error: INSTALLATION FAILED: chart reference digest mismatch: sha256:4c1e… is not sha256:7d0e…
When both a tag and a digest are given, Helm resolves the tag and then checks the digest; when only a non-existent digest is given, you may get the registry's not found directly. Both cases refuse the installation.
helm uninstall m3b -n lab8-m3; kubectl delete ns lab8-m3; rm -rf m3bhelm repo add podinfo https://stefanprodan.github.io/podinfo 2>/dev/null; helm repo update podinfo helm show chart podinfo/podinfo --version 99.0.0 2>&1 | tail -1
Error: chart "podinfo" matching 99.0.0 not found in podinfo index. (try 'helm repo update'): no chart version found
helm search repo podinfo/podinfo --versions | head -3
crds/ directory's three rules: created only on first install, not updated on upgrade, not deleted on uninstall; and the risks of putting CRDs in templates/.Enter a keyword (such as hook,CRD,Argo,atomic) to filter; click a row to jump to details.
Error: INSTALLATION FAILED: failed pre-install: 1 error occurred: * job myapp-migrate failed: BackoffLimitExceeded --- Error: UPGRADE FAILED: pre-upgrade hooks failed: … context deadline exceeded --- (Helm 3) Error: INSTALLATION FAILED: failed pre-install: timed out waiting for the condition
Symptom: The database migration Job (pre-install/pre-upgrade hook) fails or times out; the release is marked failed, and the application's Deployment is never updated (when the pre stage fails, the main resources have not been committed yet).
Root cause: In the pre stage, Helm creates hook resources one by one and waits: a Job must reach Complete/Failed, a Pod must reach Succeeded/Failed, and other kinds count as done once created. The wait limit is --timeout (applies to each hook). A migration Job that cannot reach the database (NetworkPolicy, secret not ready), image pull failures,backoffLimit exhausted, all make the hook fail.
kubectl get job,pod -n lab8-m4 -l job-name=myapp-migrate
kubectl logs -n lab8-m4 job/myapp-migrate --tail=50
helm status myapp -n lab8-m4 -o json | jq '.hooks[]|{name,events,last_run}'
NAME STATUS COMPLETIONS DURATION
job.batch/myapp-migrate Failed 0/1 31s
{"name":"myapp-migrate","events":["pre-install","pre-upgrade"],"last_run":{"started_at":"…","completed_at":"…","phase":"Failed"}}
hook-succeeded, so the failed Job remains for log inspection; the next run's before-hook-creation cleanup (#40).--timeout, and set the Job's activeDeadlineSeconds to avoid indefinite waits.helm.sh/hook-output-log-policy: hook-failed, so that on failure Helm copies the hook Pod's logs to client output (annotation from the Helm 4 source; the cause shows up directly in CI logs).See Lesson 6 Module 4 Hooks and Jobs,Lesson 7 Module 3 Hook failures and timeouts.
Error: UPGRADE FAILED: pre-upgrade hooks failed: warning: Hook pre-upgrade myapp/templates/migrate-job.yaml failed: jobs.batch "myapp-migrate" already exists
Symptom: The first upgrade works; the hook fails to create on the second upgrade.
Root cause: Hook resources are not part of the release manifest. The official docs state: If no deletion policy is given, the default is treated as before-hook-creation ; but once a policy is set explicitly (for example, only hook-succeeded) the default no longer applies. A Job left over from the last failed hook is still there, so creating one with the same name next time conflicts. A Job's Pod template is also immutable and cannot be updated in place.
kubectl get job myapp-migrate -n lab8-m4 -o jsonpath='{.metadata.annotations}' | jq .
helm get hooks myapp -n lab8-m4 | grep -A3 'helm.sh/hook'
kubectl delete job myapp-migrate -n lab8-m4 # add to the template: # "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
before-hook-creation (delete the old one before creating a new hook); when you need to keep the failure state, do not add hook-failed.ttlSecondsAfterFinished instead of the deletion policy: TTL deletion can race with Helm's wait.See Lesson 6 Module 4.
Warning Failed kubelet Error: configmap "myapp" not found Error: INSTALLATION FAILED: failed pre-install: … job myapp-migrate failed: …
Symptom: On first install, the migration Job stays CreateContainerConfigError, but it works during upgrades.
Root cause: The pre-install hook runs before any regular resources are created. The ConfigMap/Secret/ServiceAccount the Job references are regular resources that do not exist yet on first install; on upgrade they come from the previous version, so they “happen” to work (but use the old configuration).
kubectl describe pod -n lab8-m4 -l job-name=myapp-migrate | sed -n '/Events/,$p' helm template myapp ./myapp --set migration.enabled=true | grep -B2 -A3 'helm.sh/hook'
# make the objects the Job depends on into earlier-running hooks (lower weight), and keep or delete them after the task finishes
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "myapp.fullname" . }}-migrate-config
annotations:
"helm.sh/hook": pre-install,pre-upgrade
"helm.sh/hook-weight": "-5"
"helm.sh/hook-delete-policy": before-hook-creation
See Lesson 6 Module 4.
$ helm upgrade cert-manager ./cert-manager -n cert-manager
W1115 … unknown field "spec.newFeature"
$ kubectl get crd certificates.cert-manager.io -o jsonpath='{.metadata.annotations}' # version is still the old one
Symptom: The new operator version needs new CRD fields; after the chart upgrade the CRD is still the old version, and the controller reports errors or the new fields are pruned.
Root cause: Helm's policy for the crds/ directory in the chart is: created only on install (skipped if it already exists), not updated on upgrade, and not deleted on uninstall, and it is not templated. This is by design: CRDs are cluster-scoped data structures that affect all namespaces.
helm show crds ./cert-manager | yq '.metadata.name' kubectl get crd -l app.kubernetes.io/instance=cert-manager kubectl get crd certificates.cert-manager.io -o yaml | yq '.spec.versions[].name'
# Option A: apply the CRD separately before the upgrade (SSA recommended) helm show crds ./cert-manager | kubectl apply --server-side -f - helm upgrade cert-manager ./cert-manager -n cert-manager # Option B: use the switch provided by the upstream chart (for example crds.enabled / installCRDs) to put the CRD in templates/ for Helm to manage; note the risk in #44
Manage CRDs through a separate platform pipeline or a separate chart, upgrading them before the operator; in GitOps, use sync waves to guarantee ordering.
See Lesson 6 Module 6 Chart management for CRDs and operators.
Error: INSTALLATION FAILED: unable to build kubernetes objects from release manifest: resource mapping not found for name: "myapp" namespace: "lab8-m4" from "": no matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1" ensure CRDs are installed first
Symptom: The chart enables serviceMonitor.enabled, but the cluster has no Prometheus Operator installed; or both the CRD and its CR are defined in templates/ of the same umbrella chart.
Root cause: Before submitting, Helm must map each object to an API resource (discovery). If the CRD does not exist → it cannot be mapped → the whole release fails. crds/ CRDs in the crds/ directory are installed before rendering; CRDs in templates/ are in the same batch as their CRs, and do not yet exist when mapping happens.
kubectl api-resources --api-group=monitoring.coreos.com kubectl get crd | grep monitoring.coreos.com helm template myapp ./myapp | grep -n 'kind: ServiceMonitor'
{{- if and .Values.serviceMonitor.enabled (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1/ServiceMonitor") }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
...
{{- end }}
Keep optional integrations disabled by default; install the CRD/operator before the application; Capabilities are unreliable during offline rendering (GitOps), so rely on values switches (#25).
$ helm uninstall my-operator -n operators release "my-operator" uninstalled $ kubectl get postgresclusters -A No resources found ← CRD deleted; all CRs are cascade-deleted with it
Symptom: To “reinstall” the operator, uninstall was run, and as a result all teams' database CRs (along with the StatefulSets/PVCs the operator created) were cleaned up.
Root cause: The chart puts the CRD in templates/ (as a regular release resource), so uninstall deletes it; Kubernetes deletes all CRs of that type when the CRD is deleted. A CRD placed in crds/ directory is not deleted by Helm.
helm get manifest my-operator -n operators | yq 'select(.kind=="CustomResourceDefinition").metadata.name'
kubectl get crd postgresclusters.example.com -o jsonpath='{.metadata.annotations.helm\.sh/resource-policy}{"\n"}'
If already deleted: restore the CRDs and CRs from backups (Velero, the CR manifests in the GitOps repository, database backups). As a preventive measure, add this annotation to the CRD:
metadata:
annotations:
"helm.sh/resource-policy": keep # keep the object on uninstall and when it is removed from the chart
keep or be handed to a separate CRD release; use RBAC to restrict who can delete CRDs.$ helm list -n myapp
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
$ kubectl get deploy myapp -n myapp -o jsonpath='{.metadata.labels.app\.kubernetes\.io/managed-by}'
Helm ← the label says Helm, but it was actually deployed by Argo CD
Symptom: The on-call engineer follows the Helm runbook, running helm rollback reports release: not found, or manually helm upgrade after which Argo CD immediately reverts it.
Root cause: Argo CD uses helm template after rendering the manifest with , then it applies itself, without creating a release Secret; so there is no Helm history, and rollback should be done in Argo CD (or Git). Helm hooks are mapped to Argo CD sync hooks (for example pre-install/pre-upgrade → PreSync),lookup and other functions that need a cluster return empty (#24).
kubectl get deploy myapp -n myapp -o jsonpath='{.metadata.annotations}' | jq 'with_entries(select(.key|test("argocd")))'
kubectl get application -A | grep myapp
argocd app history myapp
argocd app rollback myapp <HISTORY_ID> # or git revert, then let Argo CD sync # do not run helm install/upgrade on Argo CD-managed apps: the two controllers will overwrite each other
Write runbooks separately for each deployment method; label Argo CD apps clearly (such as argocd.argoproj.io/instance); keep charts free of dependence on lookup and Helm-specific hook semantics.
Secret/myapp-redis OutOfSync - password: aGVsbG8xMjM0NTY3OA== + password: Zm9vYmFyNzc4ODk5MDA= Deployment/myapp OutOfSync - rollme: "x8Fq2" + rollme: "K1pZa"
Symptom: With auto-sync on, it syncs every few minutes, Pods keep restarting, and the Redis password keeps changing.
Root cause: Argo CD re-renders the chart on every comparison; randAlphaNum,genCA/genSelfSignedCert,now,uuidv4 the results differ each time, and lookup returns empty in Argo CD, so existing values cannot be reused.
argocd app diff myapp | head -40 grep -rnE 'randAlpha|randAlphaNum|genCA|genSelfSigned|uuidv4|now' charts/myapp/templates/
existingSecret); hand certificates to cert-manager.ignoreDifferences ignore this field (this only masks the problem; not recommended for long-term use).Add an item to the chart review checklist: “rendering must be deterministic”: render twice with the same input,diff must be empty (this can be checked automatically in CI).
$ flux get helmreleases -n myapp NAME REVISION SUSPENDED READY MESSAGE myapp 0.4.0 False False Helm upgrade failed for release myapp/myapp with chart myapp@0.4.0: … context deadline exceeded $ kubectl describe helmrelease myapp -n myapp | grep -i retries Message: upgrade retries exhausted
Symptom: Values were changed in Git; HelmRelease tries a few times and then stops retrying; it still does not move after Git is fixed.
Root cause: Flux helm-controller uses the Helm SDK to manage the real Helm release (visible in helm list), and retries based on spec.install.remediation / spec.upgrade.remediation 's retries retries; once exhausted it stays in a failed state, to avoid endless retries/rollbacks. The underlying failure causes are the same as #5 and #39 in this lesson.
kubectl describe helmrelease myapp -n myapp | sed -n '/Conditions/,$p' helm history myapp -n myapp --max 5 kubectl logs -n flux-system deploy/helm-controller | grep myapp | tail -20
# after fixing the root cause in Git, trigger reconciliation again (resets the failure count) flux suspend helmrelease myapp -n myapp && flux resume helmrelease myapp -n myapp # newer flux CLI versions also provide reconcile --force / reset-type operations; follow the Flux docs
spec:
upgrade:
remediation:
retries: 3
strategy: rollback # roll back to the last successful version after a failure
timeout: 10m
Error: UPGRADE FAILED: current release manifest contains removed kubernetes api(s) for this kubernetes version and it is therefore unable to build the kubernetes objects for performing the diff. error from kubernetes: unable to recognize "": no matches for kind "Ingress" in version "extensions/v1beta1"
Symptom: After a cluster upgrade, a release that has not been deployed for a long time can no longer be upgraded, even though the new chart already uses networking.k8s.io/v1.
Root cause: An upgrade must first build the manifest stored in the previous revision into objects for comparison; the API version in the old manifest has been removed from the new cluster, so the build fails. The objects in the cluster were already stored by the API server in the new version; only the release record is still the old one.
helm get manifest legacy-app -n legacy | grep -n '^apiVersion' | sort | uniq -c
kubectl get ingress -n legacy -o jsonpath='{.items[*].apiVersion}'
# the officially recommended helm-mapkubeapis plugin: rewrites deprecated/removed API versions in release records helm plugin install https://github.com/helm/helm-mapkubeapis helm mapkubeapis legacy-app -n legacy --dry-run helm mapkubeapis legacy-app -n legacy helm upgrade legacy-app ./legacy-app -n legacy
For the plugin's compatibility with Helm 4, follow the plugin repository's notes; if the plugin cannot be used, you can manually decode, modify and write back the release Secret (back it up first) per the Helm docs section “Updating API versions of a release manifest”.
Before a cluster upgrade, scan with tools such as pluto and kubent release records and deprecated APIs in charts; also periodically run a “no-op upgrade” to refresh the records of releases that are not deployed for a long time.
See Lesson 7 Module 6 Release storage,Lesson 6 Module 7 Compatibility design.
Flag --atomic has been deprecated, use --rollback-on-failure instead Flag --force has been deprecated, use --force-replace instead
Symptom: After upgrading to Helm 4 the pipeline still runs but shows warnings; the more subtle problem is behaviour changes: ① without --wait the default is hookOnly (waits only for hooks); ② --wait uses kstatus (watcher), which waits for resource states that Helm 3 did not check, so some deployments change from “succeeding quickly” to “timing out”; ③ new installs default to SSA, with different conflict handling (#12); ④ error strings that scripts parse have changed (for example timed out waiting for the condition → context deadline exceeded).
Root cause: Helm 4 is a major release with breaking changes to the CLI and SDK; the old flags are kept as aliases only as a transition.
grep -rnE -- '--atomic|--force( |$)|timed out waiting|registry login oci://|--post-renderer [./]' .github/ pipelines/ scripts/ helm version --short
helm upgrade --install myapp ./myapp -n prod --rollback-on-failure --wait=watcher --timeout 10m # temporarily need Helm 3's wait behaviour: --wait=legacy (for transition)
helm status -o json.Error: plugin: {Name:./kustomize-wrapper.sh Type:postrenderer/v1} not found
Symptom: In Helm 3, --post-renderer ./kustomize-wrapper.sh points to an executable script; in Helm 4 the same command fails.
Root cause: In Helm 4, the --post-renderer argument now means “a postrenderer-type plugin name”, and no longer accepts an executable file path; the script must be wrapped as a plugin (plugin.yaml declares type postrenderer) and installed into $HELM_PLUGINS.
helm plugin list helm env HELM_PLUGINS
Create the postrenderer plugin following the Helm 4 plugin docs (the apiVersion, type and runtime fields in plugin.yaml follow the helm.sh plugin docs ), then install it and run it helm plugin install ./kustomize-postrenderer :
helm upgrade --install myapp ./myapp -n prod --post-renderer kustomize-postrenderer --post-renderer-args overlays/prod
A post-renderer is a “last-resort patch”; prefer supporting the required customization through chart values. GitOps tools support post-renderers differently (Flux has postRenderers field, while Argo CD can use Kustomize's helmCharts), so evaluate them consistently before migrating.
See Lesson 6 Module 5 post-renderer and Kustomize (Helm 4 plugins),Lesson 7 Module 7.
Note: the Helm docs state that when no deletion policy is specified, the default behaviour is equivalent to before-hook-creation; writing it out explicitly is clearer and easier to review.
Choose a scenario and run it to see what Helm does in order during install/upgrade, which step fails, and what is left in the cluster after the failure.
lab,~/helmlab/lab8/myapp (already includes the optional migration Job hook).cd ~/helmlab/lab8 && cp -r myapp m4a sed -i 's/"helm.sh\/hook-weight": "0"/"helm.sh\/hook-weight": "0"\n "helm.sh\/hook-output-log-policy": hook-failed/' m4a/templates/migrate-job.yaml helm install m4a ./m4a -n lab8-m4 --create-namespace --set migration.enabled=true \ --set-json 'migration.command=["sh","-c","echo connecting db...; echo FATAL: password authentication failed; exit 1"]' --timeout 2m
… FATAL: password authentication failed ← hook Pod logs are passed back Error: INSTALLATION FAILED: failed pre-install: … job m4a-myapp-migrate failed …
kubectl get deploy -n lab8-m4 # no Deployment: the pre stage failed kubectl get job -n lab8-m4 # the failed Job is kept (the only policy is hook-succeeded) helm history m4a -n lab8-m4
helm upgrade m4a ./m4a -n lab8-m4 --set migration.enabled=true --wait kubectl get job,deploy -n lab8-m4
No resources found for the Job (hook-succeeded has deleted it) deployment.apps/m4a-myapp 1/1 1 1 20s
helm uninstall m4a -n lab8-m4; rm -rf m4acp -r myapp m4b && sed -i 's/before-hook-creation,hook-succeeded/hook-succeeded/' m4b/templates/migrate-job.yaml helm install m4b ./m4b -n lab8-m4 --create-namespace --wait helm upgrade m4b ./m4b -n lab8-m4 --set migration.enabled=true --set-json 'migration.command=["sh","-c","exit 1"]' --timeout 1m kubectl get job -n lab8-m4 # the failed Job is left behind helm upgrade m4b ./m4b -n lab8-m4 --set migration.enabled=true --wait
Error: UPGRADE FAILED: pre-upgrade hooks failed: … job m4b-myapp-migrate failed … NAME COMPLETIONS m4b-myapp-migrate 0/1 Error: UPGRADE FAILED: pre-upgrade hooks failed: warning: Hook pre-upgrade m4b/templates/migrate-job.yaml failed: jobs.batch "m4b-myapp-migrate" already exists
When Helm 4 creates the hook with SSA, the second run may also show up as a Job spec.template: … field is immutable; both are caused by an old Job with the same name. Restore the policy to before-hook-creation,hook-succeeded then upgrade again and it succeeds.
helm uninstall m4b -n lab8-m4; kubectl delete job -n lab8-m4 --all; rm -rf m4bcp -r myapp m4c
cat > m4c/templates/servicemonitor.yaml <<'EOF'
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "myapp.fullname" . }}
spec:
selector:
matchLabels:
{{- include "myapp.selectorLabels" . | nindent 6 }}
endpoints:
- port: http
EOF
helm install m4c ./m4c -n lab8-m4Error: INSTALLATION FAILED: unable to build kubernetes objects from release manifest: resource mapping not found for name: "m4c-myapp" namespace: "" from "": no matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1" ensure CRDs are installed first
sed -i '1i {{- if .Capabilities.APIVersions.Has "monitoring.coreos.com/v1/ServiceMonitor" }}' m4c/templates/servicemonitor.yaml
echo '{{- end }}' >> m4c/templates/servicemonitor.yaml
helm install m4c ./m4c -n lab8-m4 --wait && helm get manifest m4c -n lab8-m4 | grep -c ServiceMonitor0
helm uninstall m4c -n lab8-m4; kubectl delete ns lab8-m4; rm -rf m4cNo verified video specifically covering Helm hooks troubleshooting or Helm 3→4 migration was found. Storyboard (3 minutes):
helm list is empty; explain the difference between the “renderer” and the “release manager”.helm upgrade --install complete flow, and point out which step writes the release Secret and how its state changes.Scan the questions and what they test, mark the ones you are unsure of; click a row to jump to the details.
Helm is the package manager for Kubernetes: it packages a set of manifest templates + default configuration into a chart, which is rendered with different values and installed as a versioned release. Compared with kubectl apply, it provides parameterization (one template set, many environments), distribution (repositories/OCI), dependency management, and a lifecycle that treats a group of objects as one unit: history, upgrade, rollback, uninstall.
helm upgrade --install myapp oci://myacr.azurecr.io/helm/myapp --version 1.4.0 -f values/prod.yaml -n myapp --wait helm history myapp -n myapp helm rollback myapp 6 -n myapp
Point out that Helm's “release” concept is the core value; templates are just a means—without release records, rollback and cleanup would have to be implemented yourself.
“Helm is just a YAML templating tool”—ignores packaging, distribution and the release lifecycle.
See Lesson 1 Module 1.
Chart: a packaging unit (Chart.yaml + templates + values.yaml + dependencies), with its own SemVer version. Release: an instance of a chart installed under a given name in a given namespace; the same chart can be installed multiple times. Revision: every install/upgrade/rollback of a release creates a versioned record with an incrementing number. Repository: where charts are stored and distributed: a traditional HTTP repository (index.yaml) or an OCI registry.
| Concept | Identifier | Where it is stored |
|---|---|---|
| Chart | name + version (appVersion is informational only) | directory / .tgz / repository |
| Release | namespace + name (≤53 characters) | Secret in the cluster |
| Revision | 1, 2, 3… (rollback also +1) | sh.helm.release.v1.<name>.v<N> |
| Repository | URL / oci://host/path | static site / registry |
Mention that rollback also creates a new revision (rather than “going back” to an old number), and that --history-max trims old revisions (#10).
Confusing chart version with release revision.
See Lesson 1 Module 2.
From Helm 3 on, it is a pure client: the CLI (and the embeddable Go SDK) reads kubeconfig and talks directly to the API server, and release records are stored as Secrets in the release's namespace. Tiller was Helm 2's server-side component running in the cluster, usually with cluster-admin, so anyone who could reach Tiller could deploy beyond their own permissions. This is the main reason it was removed.
HELM_DRIVER).Mention that the Helm 2 → 3 migration uses the helm-2to3 plugin, and that Helm 2 releases were stored in ConfigMaps in kube-system.
“Helm 3 still needs helm init”—that is Helm 2.
Load the chart (including dependencies) → merge values and run schema validation → connect to the cluster to get the version and API list → look up the last revision (if none exists, take the install path; if pending, refuse) → render templates and sort by kind → write the new revision Secret (pending-upgrade) → run pre-upgrade hooks → compare with the previous revision and submit changes (new Helm 4 releases use SSA; older releases keep three-way merge) → delete objects that no longer exist in the new manifest → wait for readiness per the strategy → post-upgrade hooks → mark the new revision deployed, the old one superseded, and trim history.
upgrade --install ├─ Releases.Last(name) not found → install branch; pending → errPending (#2) ├─ render + validate #13–#25 ├─ create vN (pending-upgrade) process killed → stuck pending forever ├─ pre-upgrade hooks create one by one + wait (#39) ├─ ownership check (newly added objects) #4 ├─ Update: create / patch(SSA) / delete #6 #12 ├─ wait (watcher/hookOnly/legacy) #5 ├─ post-upgrade hooks └─ vN=deployed, vN-1=superseded, trim history-max
--rollback-on-failure; --cleanup-on-fail only deletes the objects newly created in this run.State the naming format and labels of the release Secret (owner=helm, name, status, version), and be able to use kubectl get secret -l owner=helm -L status to diagnose it on the spot.
“Helm deletes old resources first, then creates new ones”—it does patch/apply; only with --force-replace does it delete and recreate.
By default it is stored in a Secret in the release's namespace, named sh.helm.release.v1.<release>.v<revision>, with type helm.sh/release.v1. The data is the JSON of the release object (chart metadata and templates, values, the rendered manifest, hooks, status), gzipped and then base64-encoded. A single Secret is subject to the Kubernetes 1 MiB limit (#11).
kubectl get secret sh.helm.release.v1.myapp.v3 -n myapp -o jsonpath='{.data.release}' \
| base64 -d | base64 -d | gzip -d | jq '{name, version, status: .info.status, chart: .chart.metadata.version}'
Two base64 decodes are needed: the Secret's data is itself base64, and what Helm writes is base64-encoded once more.
--set passwords passed in).Mention that secrets in values should be switched to the existingSecret approach, so the release record contains no plain text.
“Stored locally on the Helm client”—that is the repository cache; release state lives in the cluster.
See Lesson 7 Module 6.
From lowest to highest: the chart's values.yaml → overrides from the parent chart for the subchart → -f/--values files (when there are several, later ones override earlier ones) → --set,--set-string,--set-file,--set-json,--set-literal. Maps are deep-merged, lists are replaced as a whole, and setting a key to null deletes the default key.
helm upgrade --install myapp ./myapp -f values/common.yaml -f values/prod.yaml --set image.tag=1.4.0 helm get values myapp # only user-supplied values helm get values myapp --all # final merged values
--reuse-values,--reset-values,--reset-then-reuse-values change this behaviour (#18).Point out that values is the chart’s API and should come with a schema, documentation and a compatibility promise.
“The first file wins when -f is given several times”—the opposite is true; the later file overrides the earlier one.
See Lesson 1 Module 4.
rollback reads the manifest (and hooks) stored in the target revision, applies it to the cluster as the new desired state, and creates a new revision described as “Rollback to N”. It does not roll back the CRDs in crds/, the data in PVCs, database schema migrations or external systems (DNS, cloud resources), and it does not undo what hooks have already done.
helm rollback myapp equivalent to 0).Stress that the “expand → migrate → contract” migration strategy is what makes rollback possible.
“rollback restores the database”—Helm only manages Kubernetes objects.
helm template: fully offline rendering (Capabilities use defaults, lookup returns empty), with no API validation. --dry-run=client: also does not contact the cluster; it simulates the output of an install. --dry-run=server: connects to the cluster, so lookup works, and the API server runs a server-side dry-run validation without persisting anything. helm lint: checks the chart structure, Chart.yaml, whether templates render and whether the YAML is valid,required and failures are only reported as warnings.
| Cluster access | lookup | API validation | Purpose | |
|---|---|---|---|---|
| template | No | Empty | No (--validate optional) | CI rendering, GitOps |
| --dry-run=client | No | Empty | No | Preview |
| --dry-run=server | Yes | Available | Yes | Final check before go-live |
| lint | No | Empty | No | Chart quality gate |
--hide-secret Use only together with dry-run, to avoid printing Secrets in the output.
helm template | kubeconform -strict -kubernetes-version 1.37.0.Mention helm diff upgrade (plugin) and kubectl diff for reviewing changes relative to production.
“If lint passes, the install will succeed”—lint does not contact the cluster and does not enforce required values.
Helm is a “deploy-time” tool: it renders manifests, submits them, records the version, and exits once the deployment is done. An Operator is a “run-time” controller: it keeps watching custom resources and encodes domain knowledge (backup, failover, scaling, upgrade orchestration). For stateless apps, Helm is enough; for stateful systems that need day-to-day operational logic (databases, message queues), use an Operator, and the Operator itself is usually installed with Helm.
Give a decision criterion: whether there are operational actions that must “respond automatically to runtime events”.
“An Operator is an upgraded Helm”—they solve problems at different layers and are often used together.
See Lesson 6 Module 6.
Helm 4 (released 2025-11, currently 4.3.x): new installs default to server-side apply; kstatus-based waiting (--wait=watcher|hookOnly|legacy); --atomic renamed --rollback-on-failure,--force renamed --force-replace; plugin system reworked (optional WebAssembly runtime; CLI, getter and postrenderer plugin types; post-renderer must be a plugin); OCI support for installing by digest,registry login accepts only domain names; stable SDK API, experimental Chart API v3. Helm 3’s v2 charts work without changes.
--server-side it can be switched explicitly.Give a phased migration plan (Q48).
“Helm 4 requires rewriting all charts”—apiVersion v2 charts keep working as they are.
See Lesson 7 Module 7.
--wait After submitting, Helm waits for resources to become “ready”; if this takes longer than --timeout it fails. Helm 4: watcher watcher uses kstatus to watch each resource until it reaches Current (Deployment replicas available, Job complete, and so on); hookOnly (default when --wait is omitted) waits only for hooks; legacy is Helm 3’s polling implementation. Writing --wait alone is equivalent to watcher; --rollback-on-failure sets the wait strategy default to watcher.
resource Deployment/ns/name not ready. status: InProgress …), which is easier to troubleshoot than Helm 3’s “timed out waiting for the condition” (#5).--wait-for-jobs makes regular Jobs count toward waiting; a paused Deployment is skipped.Point out that “ready” does not mean “business-healthy”: readinessProbe must be well designed, or add smoke tests in the pipeline or helm test.
“--wait waits until the Pod logs show started”—Helm only looks at Kubernetes status.
Three-way merge is computed on the client: it compares the manifest of the previous revision, the new manifest and the current object in the cluster, and generates a patch. This preserves other people’s changes to fields it does not manage, and removes fields it set before but no longer declares. SSA hands the computation to the API server: Helm submits its full intent under its own field manager, the server merges based on managedFields, and conflicts are rejected (unless forced). A field is deleted if it was “managed by me last time but not submitted this time.”
| Three-way merge (Helm 3) | SSA (default for new releases in Helm 4) | |
|---|---|---|
| Where it is computed | Client | API server |
| Conflicts with others’ changes | Silently overwritten / kept | reports a conflict (#12),--force-conflicts |
| Field ownership | None | Recorded precisely in managedFields |
| Merging for CRDs | JSON merge patch (lists replaced as a whole) | Based on the schema’s list-type / map-keys |
helm upgrade --server-side=true, and first verify conflicts in a pre-production environment.Be able to explain the difference between Apply and Update operations in managedFields.
“SSA is just another way of writing kubectl apply, with no behaviour difference.”
See Lesson 7 Module 4.
deployed (currently active, only one at a time), superseded (replaced by a later successful revision), failed (the operation failed), pending-install / pending-upgrade / pending-rollback (operation in progress), uninstalling, uninstalled (kept with --keep-history), and unknown. Only pending-* blocks a new upgrade or rollback (#2); failed can be overwritten by the next upgrade; uninstalled makes a same-named install fail (#1), unless --replace.
helm list -n myapp -a # all statuses helm list -n myapp --pending --failed kubectl get secret -n myapp -l owner=helm -L name,status,version
Point out that pending is a “pessimistic lock”: CI must serialize deployments of the same release, and the job timeout must be greater than the Helm timeout.
“A failed release must be uninstalled before it can be deployed again.”
See Lesson 7 Module 2.
A team uses sed to write the image tag into YAML and then kubectl apply, across dev/staging/prod environments. The manager asks: what are the benefits, risks and migration steps of introducing Helm?
helm create to bootstrap, moving the existing YAML into templates,helm template | kubectl diff confirming zero diff; ② in dev, use --take-ownership or annotate to take over; ③ add lint/kubeconform/ct to CI; ④ push the chart to OCI; ⑤ switch environment by environment, and introduce GitOps last.After seeing “another operation is in progress”, the on-call engineer ran kubectl delete secret -l owner=helm,name=myapp. What problems arise now? How do you recover? How do you prevent this in future?
helm upgrade --install to redeploy (the annotations match, so Helm can take over the objects and the install becomes the new v1); compare helm template with the live objects to confirm there are no unexpected changes.All the videos above are based on Helm 3; for the Helm 4 changes (Q10–Q12), refer to this lesson and helm.sh. No verified video specifically covering Helm interview questions was found, so it is recommended to use “Mock interview” and replay your own recording.
_helpers.tpl in a typical fullname/labels/selectorLabels implementation, and explain each design point.Scan the questions and what they test first; click a row to jump to the details.
Chart.yaml (metadata),values.yaml (default values),values.schema.json (optional validation),templates/ (templates,_ files starting with _ are not rendered; NOTES.txt holds the install notes),charts/ (dependencies),crds/ (CRDs, not templated),Chart.lock,.helmignore,README.md. Key Chart.yaml fields: apiVersion: v2,name,version (SemVer, required),appVersion,type (application/library),kubeVersion,dependencies,deprecated,annotations.
apiVersion: v2
name: myapp
description: Flask + Redis demo
type: application
version: 1.4.0 # the chart’s own version, incremented on every chart change
appVersion: "1.1" # application version, informational only (default image tags often reference it)
kubeVersion: ">=1.30.0-0"
dependencies:
- name: redis
version: "0.x.x"
repository: oci://registry-1.docker.io/cloudpirates
condition: redis.enabled
Mention .helmignore which can significantly reduce the package and release record size (#11).
“It doesn’t matter if I change the templates but not the version”—different content under the same version breaks traceability (#32, #33).
See Lesson 2 Module 1.
Helm templates = Go text/template + the Sprig function library + Helm’s custom functions. toYaml converts a structure to YAML text, used together with nindent N (newline first, then indent) to embed it; default provides a fallback for empty values; required fails when a value is missing; quote adds quotes to avoid type inference; tpl renders a string from values as a template; include calls a named template and returns a string.
metadata:
labels:
{{- include "myapp.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount | default 1 }}
template:
spec:
containers:
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
env:
- name: REDIS_HOST
value: {{ tpl .Values.redisHost . | quote }} # values can contain "{{ .Release.Name }}-redis"
resources:
{{- toYaml .Values.resources | nindent 12 }}
Other common ones: dig,hasKey,ternary,b64enc,sha256sum,toJson,fromYaml,lookup,fail,semverCompare.
false/0/ an empty string is also replaced by the default (Sprig treats it as “empty”); do not use default true for boolean switches.Mention that Helm 4 plugins can register custom template functions, but this reduces the chart’s portability to other environments (such as Argo CD).
Using indent instead of nindent and handling newlines by hand (the source of #13).
See Lesson 2 Module 2.
Write named templates in _helpers.tpl using {{ define "myapp.labels" }}…{{ end }} define. template is a native Go action that outputs directly and cannot be piped; include is a Helm function that returns a string, which can be piped into | nindent, so include is almost always used. Named templates are global—the parent chart and all subcharts share one namespace, so without a prefix they overwrite each other.
{{- define "myapp.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}{{- end -}}
{{- end -}}
{{- end }}
{{- define "myapp.selectorLabels" -}}
app.kubernetes.io/name: {{ include "myapp.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
When multiple arguments are needed, pass dict "root" $ "component" "worker".
“template and include are the same.”
See Lesson 2 Module 3.
. is the current context; at the top level it contains .Values/.Release/.Chart/.Capabilities/.Template/.Files. with and range change . to the current object/element; $ always points to the root context. Inside a block, access globals with $ (#21).
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 2 }}
{{- end }}
{{- range $name, $cfg := .Values.workers }}
- name: {{ $name }}
image: {{ $.Values.image.repository }}
replicas: {{ $cfg.replicas }}
{{- end }}
with skips the whole block when the value is empty (you can also write else); range iterates over maps sorted by key, and over lists in order.
. or $.Mention variable scope: inside if/range, use = to change an outer variable (supported in Go 1.11+ templates).
Writing in range .Release.Name and assuming it works.
See Lesson 2 Module 3.
The schema validates the merged values against JSON Schema before rendering (types, required keys, enums, ranges, forbidden extra keys); install, upgrade, lint and template all run it, and errors are centralized and clear (#16). required required can only check whether a single value is empty, is scattered across templates, and only produces a warning during lint. The two complement each other: the schema handles structure and types, while required/fail handle cross-field business rules.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": ["image"],
"properties": {
"image": { "type": "object", "required": ["repository"],
"properties": { "repository": {"type": "string"}, "tag": {"type": "string"},
"pullPolicy": {"enum": ["Always","IfNotPresent","Never"]} } },
"replicaCount": { "type": "integer", "minimum": 1 },
"service": { "type": "object", "additionalProperties": false,
"properties": { "type": {"type":"string"}, "port": {"type":"integer"} } }
}
}
Helm 4.3 uses santhosh-tekuri/jsonschema v6 for validation; it supports multiple draft versions and relies on $schema to identify the draft; a subchart’s schema also applies to its own section of the values; in an emergency you can --skip-schema-validation.
global to subcharts, so the schema must allow global.Use tools such as helm-schema to generate the schema from values comments, and let the IDE complete based on the schema.
“The schema only takes effect during lint.”
See Lesson 2 Module 5.
Declare them in Chart.yaml’s dependencies section (name, version constraint, repository). helm dependency update resolves versions, writes Chart.lock and downloads into charts/; build rebuilds exactly from Chart.lock. condition/tags controls whether it is enabled; alias lets the same chart be included multiple times under different names; import-values imports values exported by the subchart into the parent chart.
dependencies:
- name: redis
alias: cache
version: "~0.6.0"
repository: oci://registry-1.docker.io/cloudpirates
condition: cache.enabled
tags: [backend]
- name: common
version: "2.x.x"
repository: oci://myacr.azurecr.io/helm
import-values:
- child: exports.defaults
parent: commonDefaults
Point out the risks of an umbrella chart with too many dependencies (one release that is too large, #11, and coupled upgrades); consider Helmfile multi-release orchestration (Q34).
Committing the charts/ directory to Git and updating it by hand.
See Lesson 2 Module 6.
type: library chart provides only named templates; it cannot be installed on its own and renders no resources. It suits sharing standard Deployment/Service/label/security-context implementations within an organization, keeping dozens of application charts consistent while each keeps its own independent release. An ordinary subchart, by contrast, means “installing another component alongside.”
# application chart’s templates/deployment.yaml
{{- include "platform.deployment" (dict "root" . "component" "web") }}
# in the library chart
{{- define "platform.deployment" -}}
{{- $root := .root -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "platform.fullname" $root }}-{{ .component }}
...
{{- end }}
Discuss the trade-off between “one generic chart deploying all applications” and “a library chart + thin application charts” (Q44).
“A library chart can be helm installed.”
See Lesson 2 Module 6.
A hook is a resource with the helm.sh/hook annotation that runs at specific points in the lifecycle: pre/post-install, pre/post-upgrade, pre/post-rollback, pre/post-delete, and test. Within the same phase, hooks are sorted by helm.sh/hook-weight weight in ascending order (then by kind and name), created one by one and waited on until complete. helm.sh/hook-delete-policy: before-hook-creation, hook-succeeded, hook-failed. Hooks are not part of the release manifest, and uninstall does not delete them.
helm.sh/hook-output-log-policy (hook-succeeded / hook-failed), which sends hook Pod logs to the client.helm get hooks.Explain that hooks are mapped to sync hooks in Argo CD, and the behaviour is not identical (#45).
“Hooks in the same phase run in parallel.”
See Lesson 6 Module 4.
A Pod or Job with the helm.sh/hook: test annotation, placed in templates/tests/, is run by helm test <release> after installation; a container exit code of 0 means pass. Used for post-deployment smoke tests: the service is reachable, health checks pass and dependencies are connected.
apiVersion: v1
kind: Pod
metadata:
name: "{{ include "myapp.fullname" . }}-test-healthz"
annotations:
"helm.sh/hook": test
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
spec:
restartPolicy: Never
containers:
- name: curl
image: curlimages/curl:8.11.1
args: ["-fsS", "http://{{ include "myapp.fullname" . }}:{{ .Values.service.port }}/healthz"]
helm test myapp -n myapp --logs --timeout 2m
Pin the test image to a version or digest, and comply with the cluster’s Pod Security policy (non-root, read-only file system).
Confusing unit tests (template assertions) with helm test (in-cluster smoke tests) (see Q25).
lookup "apiVersion" "Kind" "namespace" "name" Queries objects in the cluster at render time (lists them if name is empty). Commonly used for “reuse the existing Secret if present, otherwise generate one”. Limitations: helm template,--dry-run=client Argo CD and other offline renders return empty; the executor needs read permission; and it makes rendering depend on cluster state, reducing repeatability.
See #24 and #46 for examples and pitfalls. Alternatives: existingSecret + External Secrets; hand certificates to cert-manager; pass cross-release values explicitly through values.
Be able to explain why rendering determinism matters for GitOps diffs.
“lookup can find cluster objects in every situation.”
A Deployment only rolls out when the Pod template changes; a commonly used checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} annotation reflects config content changes in the Pod template (#22). The fields whose changes cause upgrade failures are immutable fields: a Deployment/StatefulSet selector, a StatefulSet’s volumeClaimTemplates and serviceName, a Job’s Pod template, a Service’s clusterIP, and parts of a PVC’s spec (#6).
--force-replace.--cascade=orphan to delete the StatefulSet and let Helm recreate it.Run ct install --upgrade in CI to catch immutable-field changes before merge.
“helm upgrade automatically restarts all Pods.”
See Lesson 6 Module 7.
In layers: ① static: helm lint --strict, yamllint, schema validation of each environment’s values; ② unit tests: helm-unittest asserts on the rendered output (for example, “replicas is not rendered when HPA is enabled”); ③ manifest validation: helm template | kubeconform -strict, policy checks (Kyverno CLI / conftest); ④ integration: chart-testing (ct) runs install + helm test in kind, and uses --upgrade to upgrade from the previous version; ⑤ determinism check: rendering twice produces an empty diff.
# tests/deployment_test.yaml (helm-unittest)
suite: deployment
templates: [templates/deployment.yaml]
tests:
- it: should not render replicas when autoscaling is enabled
set: { autoscaling.enabled: true }
asserts:
- notExists: { path: spec.replicas }
- it: selector must not contain version
asserts:
- notExists: { path: spec.selector.matchLabels["app.kubernetes.io/version"] }
ct lint --config ct.yaml --target-branch main ct install --config ct.yaml --upgrade
Turn this lesson’s production issues (#6, #13, #19, #22, #46) into unit tests, forming a “regression test library.”
“helm lint is the test.”
The chart in the PR: selector includes app.kubernetes.io/version; env uses a list; the password {{ randAlphaNum 16 }}; ServiceMonitor renders unconditionally; there is no schema; Chart.yaml version is unchanged. List your review comments and their priority.
myapp 1.5 needs to add columns to a PostgreSQL table (in addition to Redis). Candidate options: a pre-upgrade hook Job, an init container, migration at application startup, or a separate pipeline step. Compare them and give a recommendation.
Scan the questions and what they test first; click a row to jump to the details.
An HTTP repository serves index.yaml + .tgz as a static site; clients must repo add/update and cache the index; OCI stores charts as OCI artifacts in a container registry, pulled by oci://host/path/name:version tag or by digest directly, reusing the registry’s authentication, replication, scanning and retention policies. Prefer OCI for new projects.
| HTTP repository | OCI | |
|---|---|---|
| Index | index.yaml (very large for big repositories) | None; resolved by tag |
| Authentication | basic auth / public | registry tokens (ACR/ECR/GHCR) |
| Search | helm search repo | registry API / Artifact Hub |
| Immutability | By convention | Digest + tag immutability policy |
| Typical hosting | GitHub Pages + chart-releaser | ACR, ECR, GHCR, Harbor |
helm show chart oci://….Mention that OCI puts charts and images in the same registry under the same replication and retention policies, which also makes syncing to offline/isolated environments easier.
“OCI also requires helm repo add first” (#26).
See Lesson 1 Module 6.
CI: helm dependency build → helm lint → helm package (you can set --version/--app-version) → helm registry login <host> → helm push chart.tgz oci://host/path (outputs the digest) → sign. CD: helm upgrade --install name oci://host/path/chart --version X, or in Helm 4 oci://host/path/chart@sha256:….
helm package charts/myapp --version 1.4.0 --app-version 1.1 -d dist/
az acr login -n myacr --expose-token --query accessToken -o tsv | helm registry login myacr.azurecr.io -u 00000000-0000-0000-0000-000000000000 --password-stdin
helm push dist/myapp-1.4.0.tgz oci://myacr.azurecr.io/helm 2>&1 | tee push.log
DIGEST=$(awk '/Digest:/{print $2}' push.log)
helm upgrade --install myapp "oci://myacr.azurecr.io/helm/myapp@${DIGEST}" -n myapp -f values/prod.yaml --wait
path/chartname repository in advance (#34).Record both the chart version and the digest in the deployment record, so an audit can prove that “what was deployed is what was reviewed.”
In registry login , writing oci:// prefix (Helm 4 accepts only domain names, #30).
Helm’s native provenance: helm package --sign is generated with a PGP private key, producing a .prov file (containing the hash of Chart.yaml and the package, PGP-signed); at install time, use --verify --keyring to verify. For OCI, Sigstore cosign is more common: it signs the chart artifact’s digest (key-based or keyless with a transparency log), verified by an admission controller or the pipeline. Both need digest pinning.
helm package charts/myapp --sign --key 'Release Bot' --keyring ~/.gnupg/secring.gpg helm verify myapp-1.4.0.tgz --keyring pubring.gpg helm install myapp oci://myacr.azurecr.io/helm/myapp --version 1.4.0 --verify --keyring pubring.gpg cosign sign --yes myacr.azurecr.io/helm/myapp@sha256:… cosign verify myacr.azurecr.io/helm/myapp@sha256:… --certificate-identity-regexp 'https://github.com/org/charts/.*' --certificate-oidc-issuer https://token.actions.githubusercontent.com
The modern GnuPG keyring format (.kbx) must first be exported to the legacy format for Helm to use; Helm 4 plugins also support signing and verification (helm plugin verify).
Include chart signatures, image signatures and SBOMs together in the supply-chain policy (Q36).
“If the registry has access control, signing is unnecessary.”
Principle: secrets must not go into Git or values in plain text (they end up in the release record). helm-secrets + SOPS: values files are encrypted in Git and decrypted at deploy time—simple, but the deploy side needs the decryption key, and the release record still holds plain text. External Secrets Operator: the chart only declares an ExternalSecret, and a controller syncs it from Key Vault/Secrets Manager into a Kubernetes Secret—the secret never passes through Helm. Secrets Store CSI: mounted as a volume, optionally synced into a Secret.
| Does the secret pass through Helm? | Rotation | GitOps-friendly | |
|---|---|---|---|
| --set / plaintext values | Yes (visible in the release Secret) | Manual | No |
| helm-secrets + SOPS | Yes | Change the file and redeploy | Requires plugin support |
| External Secrets | No | Automatic refresh | Yes |
| CSI driver | No | Refreshed on mount | Yes |
The chart provides a uniform existingSecret interface, decoupled from the source of the secret.
Point out that the configmap storage driver makes the secrets in the release record visible to anyone who can read ConfigMaps.
“Kubernetes Secrets are encrypted, so putting them in values is fine.”
Helm’s permissions are simply the executor’s Kubernetes RBAC. Each application pipeline’s identity has create/update/delete rights only on the resources it needs within its target namespace (including Secrets, since they hold release records), and is not granted cluster-admin; cluster-level resources (CRDs, ClusterRoles, webhooks) are managed separately by a platform pipeline. In the cloud, OIDC is used to obtain short-lived credentials.
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata: { name: helm-deployer, namespace: myapp }
rules:
- apiGroups: ["", "apps", "batch", "networking.k8s.io", "policy", "autoscaling"]
resources: ["deployments","services","configmaps","secrets","serviceaccounts","jobs","ingresses","poddisruptionbudgets","horizontalpodautoscalers","pods","pods/log"]
verbs: ["get","list","watch","create","update","patch","delete"]
AKS: Entra ID groups + namespace-scoped roles in Azure RBAC for Kubernetes; EKS: access entries + namespace-scoped access policies (#36).
Keep the deployment identity, the chart-push identity and the registry-pull identity separate.
“Helm needs cluster-admin.”
PR stage: ct lint (including the version-increment check), helm-unittest, kubeconform, policy checks, helm-docs to verify the README is current, ct install (kind) + upgrade test. Merge to main: package (including dependencies) → push to OCI (or chart-releaser publishes a GitHub Release + index) → sign → update the version in the deployment repository (Renovate/automatic PR).
# GitHub Actions snippet (pin tool versions; check each project’s release page)
jobs:
test:
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 }
- uses: azure/setup-helm@v4
with: { version: v4.3.2 }
- uses: helm/chart-testing-action@v2
- run: ct lint --target-branch ${{ github.event.repository.default_branch }}
- uses: helm/kind-action@v1
- run: ct install --target-branch ${{ github.event.repository.default_branch }} --upgrade
Turn issues such as #6, #13 and #46 from this lesson’s issue list into automated checks.
Only lint, with no install or upgrade tests.
See Lesson 5 Modules 1–2.
Serialize deployments of the same release → log in to cloud and cluster via OIDC → render and show the diff (helm diff upgrade) for approval → helm upgrade --install --version <pinned> -f values/prod.yaml --rollback-on-failure --wait --timeout 10m --history-max 20 → post-deployment smoke test (helm test / external probe) → on failure, collect evidence and alert.
set -euo pipefail
helm diff upgrade myapp oci://myacr.azurecr.io/helm/myapp --version 1.4.0 -f values/prod.yaml -n myapp --allow-unreleased
helm upgrade --install myapp oci://myacr.azurecr.io/helm/myapp --version 1.4.0 \
-f values/common.yaml -f values/prod.yaml -n myapp --create-namespace \
--rollback-on-failure --wait=watcher --timeout 10m --history-max 20 || {
kubectl get events -n myapp --sort-by=.lastTimestamp | tail -40
helm history myapp -n myapp --max 5; exit 1; }
helm test myapp -n myapp --logs
job timeout > Helm timeout; failure information is collected automatically through hook-output-log-policy and events (#9, #39).
Using helm install || helm upgrade as a two-step process.
Argo CD treats Helm as a renderer: helm template It generates manifests, which Argo CD applies and diffs itself; there is no Helm release (#45), hooks are mapped to sync hooks, and lookup is unavailable. The Flux helm-controller uses the Helm SDK to run the real install/upgrade, with release records, supporting Helm hooks, tests and remediation (retries, rollback, uninstall) (#47).
| Argo CD | Flux | |
|---|---|---|
| Helm release | None | Yes (visible in helm list) |
| Diff detection | Its own diff, with an intuitive UI | Helm storage + drift-detection options |
| hooks | Mapped to PreSync/PostSync | Native Helm |
| Failure handling | Retries, sync waves | remediation retries + strategy |
| Multi-cluster | Centralized ApplicationSet | Per-cluster autonomy |
Point out that both require deterministic chart rendering (#46), and the authentication methods for OCI chart sources (Flux: OCIRepository/HelmRepository type oci; Argo CD: repository credentials with enableOCI).
“Apps deployed by Argo CD can be rolled back with helm rollback.”
See Lesson 5 Modules 4–5.
Helmfile uses one declarative file to describe “multiple releases + each chart’s version + values + environments”, and supports helmfile diff/apply/sync, release dependencies (needs), environment layering and secrets integration. Compared with an umbrella chart, it keeps multiple independent releases (each upgraded, rolled back and with its own history), avoiding a single release that is too large and coupled.
environments:
dev: { values: [env/dev.yaml] }
prod: { values: [env/prod.yaml] }
---
releases:
- name: redis
namespace: myapp
chart: oci://registry-1.docker.io/cloudpirates/redis
version: 0.x.x
- name: myapp
namespace: myapp
chart: oci://myacr.azurecr.io/helm/myapp
version: 1.4.0
needs: [myapp/redis]
values: [values/common.yaml, "values/{{ .Environment.Name }}.yaml"]
helmfile -e prod diff && helmfile -e prod apply
Bootstrap platform components (CRDs, controllers) with Helmfile, and manage applications with GitOps.
“Helmfile is a replacement for Helm”—it orchestrates Helm.
See Lesson 5 Module 6 Helmfile and multi-release orchestration.
version is the chart’s SemVer; it must be incremented for any change to the chart’s content (templates, default values, dependencies); appVersion describes the default application version deployed, often used as the default image tag. The two are independent: an application release can change only appVersion (while bumping the chart patch version), and a chart refactor can leave appVersion unchanged. Published versions are immutable.
helm package --version --app-version.1.5.0-rc.1, consumers need --devel to use them (#27).+build to distinguish content (#32); put it in annotations or appVersion.Record the source commit in Chart.yaml annotations (for example org.opencontainers.image.source OCI-style keys) for easier traceability.
“version and appVersion must be the same.”
See Lesson 2 Module 1.
Source and maintenance (Artifact Hub verified publisher, update frequency, license); image source and whether it can continue to be obtained (for example, the Bitnami catalog change in 2025-08); default permissions (RBAC, hostPath, privileged mode, ClusterRole scope); what the hooks do; whether there are CRDs and webhooks; scanning of the rendered output (Trivy/Checkov/Kyverno); signature and digest pinning; then mirror both the images and the chart into your own registry.
helm pull oci://registry-1.docker.io/cloudpirates/redis --version 0.x.x --untar -d review/
helm template r review/redis -f my-values.yaml | yq 'select(.kind|test("Role|Binding|Webhook|CustomResourceDefinition"))|.kind+"/"+.metadata.name'
helm template r review/redis -f my-values.yaml | grep -E 'image:' | sort -u
helm get hooks … # or check helm.sh/hook in templates
Record review conclusions in an internal “approved chart list”, and use policy to block HelmRepository/OCIRepository sources that are not on it.
“Charts in official repositories are all safe.”
Two layers of diff: ① rendering diff against the previous chart version (offline: run old and new charts with the same values through helm template and diff the output; a GitOps repository can post it via a CI bot); ② diff against production (helm diff upgrade plugin, or --dry-run=server + kubectl diff). Focus on: selector, PVCs, deleted objects, RBAC and images.
helm plugin install https://github.com/databus23/helm-diff helm diff upgrade myapp oci://myacr.azurecr.io/helm/myapp --version 1.5.0 -f values/prod.yaml -n myapp --context 3 diff -u <(helm template myapp ./chart-1.4.0 -f values/prod.yaml) <(helm template myapp ./chart-1.5.0 -f values/prod.yaml)
Compatibility of helm-diff with Helm 4 follows the plugin repository’s notes; Argo CD users can use directly argocd app diff.
--hide-secret (dry-run only).Set automatic blocking rules for “deleted objects”, “PVC replacement” and “RBAC expansion.”
Reviewing only changes to the values file and ignoring the rendered output.
See Lesson 1 Module 7.
The same immutable chart version is promoted across environments, changing only values. Values layers: common.yaml → env/<env>.yaml → cluster/<region>.yaml, maps merge, and avoid lists that need to be stacked (#19). Promotion is done by a PR that changes the chart version in the environment directory (GitOps); prod requires approval.
deploy-repo/
apps/myapp/
base/values.yaml
envs/dev/values.yaml chart: 1.5.0-rc.2
envs/staging/values.yaml chart: 1.5.0
envs/prod-cc/values.yaml chart: 1.4.0 ← canadacentral
envs/prod-ca/values.yaml chart: 1.4.0 ← ca-central-1
Argo CD ApplicationSet or Flux Kustomization generates deployments per directory; Renovate automatically opens PRs for dev, and staging/prod are promoted manually.
Run lint + schema + rendering diff on each environment’s values in CI.
One branch per environment (branches drift and are hard to merge).
See Lesson 6 Module 2 Values layering and multiple environments.
50 teams, each with its own services; the platform team wants unified standards without becoming a bottleneck. Design the chart organization, repositories, CI/CD and governance.
The audit used helm get values and read the production database password. Propose a short-term containment and a long-term remediation plan.
--set *password*; static scanning of values and pipelines.helm get values --all no longer contains secrets.Right now Jenkins uses helm upgrade to deploy 30 releases. Would you choose Argo CD or Flux? During migration, how do you avoid downtime and “dual controllers”?
Scan the questions and what they test first; click a row to jump to the details.
Helm only submits the new desired state; zero downtime comes from workload design: RollingUpdate (maxUnavailable: 0, maxSurge: 1), an accurate readinessProbe, preStop + terminationGracePeriodSeconds to drain connections, PDBs, and multiple replicas spread across nodes/availability zones, combined with --wait=watcher and automatic rollback; also avoid changes that force replacement (immutable fields, renames).
strategy:
type: RollingUpdate
rollingUpdate: { maxUnavailable: 0, maxSurge: 1 }
template:
spec:
terminationGracePeriodSeconds: 30
topologySpreadConstraints:
- maxSkew: 1
topologyKey: topology.kubernetes.io/zone
whenUnsatisfiable: ScheduleAnyway
labelSelector: { matchLabels: {{- include "myapp.selectorLabels" . | nindent 10 }} }
containers:
- lifecycle: { preStop: { exec: { command: ["sh","-c","sleep 10"] } } }
readinessProbe: { httpGet: { path: /healthz, port: http }, periodSeconds: 5 }
Mention connection draining at the Ingress/Gateway layer, and load balancer health-check intervals (LBC target group deregistration delay).
“helm upgrade is zero-downtime by itself.”
See Lesson 6 Module 7 Zero-downtime upgrades and compatibility design.
There is no silver bullet. pre-upgrade hook Job: runs once, and a failure blocks the release. Suitable for small and medium migrations, but you must handle first-install dependencies, leftovers and GitOps mapping (#39–#41, #45). init container: runs in every Pod and needs idempotency + a distributed lock. Standalone pipeline step: can be approved, observed and retried separately; suitable for large or long-running migrations. Either way, the migration must be backward compatible (expand → deploy → contract).
before-hook-creation,hook-succeeded,activeDeadlineSeconds,backoffLimit: 0~1,hook-output-log-policy: hook-failed, relying only on configuration created at the hook level.--timeout CI timeouts and pending risk); use a standalone Job + observability.Provide a runbook for “migration failure”: failed hook logs, release status, and how to retry safely.
“Put the migration in a post-upgrade hook”—the new code is already running against the old schema.
See Lesson 6 Module 4.
First confirm no deployment is running (CI, a colleague’s terminal, the GitOps controller); check helm history and the creation time of the pending revision; the preferred option is helm rollback <last deployed> to clear it; if rollback is not possible (pending-install), back up and delete the pending Secret, then redeploy; finally fix the root cause (CI cancellation, timeout settings).
helm history myapp -n myapp --max 5 kubectl get secret -n myapp -l owner=helm,name=myapp -L status,version --sort-by=.metadata.creationTimestamp helm rollback myapp <LAST_DEPLOYED> -n myapp --wait # or: kubectl get secret sh.helm.release.v1.myapp.v18 -n myapp -o yaml > v18.yaml && kubectl delete secret sh.helm.release.v1.myapp.v18 -n myapp
Prevention: CI concurrency control, job timeout > --timeout, alert on “pending longer than N minutes”.
“Delete all release Secrets” (scenario question 5-2).
See Lesson 7 Module 2.
Usually enabled: on failure it quickly restores the last known-good version and reduces manual intervention. It must be paired with failure evidence collection (#9), sensible timeouts, readiness probes that truly reflect health, and backward-compatible migrations. Roll forward is better when an irreversible data change has already run, the rollback target has a security vulnerability, or the problem lies in the environment (quotas, external dependencies) rather than the version itself.
remediation.strategy: rollback will temporarily make the cluster diverge from Git, so fix Git afterward.Use SLO-driven canary releases to complement Helm’s “at-deploy-time checks”.
“With automatic rollback, no testing is needed.”
See Lesson 5 Module 7.
Umbrella: one release deploys the whole system, with consistent versions and simple installation (suited to customer deliveries and demo environments). Drawbacks: coupled upgrades (one failing service fails the whole release), larger release records (#11), coarse permission granularity, and teams blocking each other. Separate charts: each is released and rolled back independently and teams are autonomous; composition needs an orchestration tool (Helmfile, GitOps dependency ordering).
| umbrella | Separate charts | |
|---|---|---|
| Release cadence | Unified | Independent |
| Rollback granularity | Whole system | Single service |
| Dependency ordering | hooks / no guarantee | needs / sync wave |
| Best for | Packaged delivery, small systems | Multi-team microservices |
Cite #11 and #23 to illustrate umbrella’s real failure modes.
“An umbrella chart guarantees subchart install order”—subchart resources are submitted together with parent resources and sorted together, not in dependency order.
Two patterns: ① a single generic application chart (every service only writes values) — highest consistency, but the values surface balloons into “another YAML language”; ② a library chart + thin application charts — standardizes the common parts while applications keep their freedom. I lean toward ② with a strict schema, secure defaults (non-root, resource requests, probes, PDB), semantic versioning with automatic upgrade PRs, and rendering snapshot tests.
Measure with metrics: adoption rate, version distribution, policy violation count.
“Write one giant generic chart where every field is configurable.”
See Lesson 2 Module 6,Lesson 6 Module 8 Comprehensive architecture review.
CRDs are cluster-level APIs and are managed separately from the operator: the platform pipeline (or a dedicated CRD chart / the upstream-provided CRD toggle) upgrades CRDs first and the operator afterward; add helm.sh/resource-policy: keep or place it in crds/ to prevent deletion on uninstall (#44); check version conversion before upgrading (conversion webhook, storage version); guard the application chart’s use of CRs with Capabilities + values toggles (#43).
crds/: simple, but never upgraded (#42); templates/: upgradable, but dangerous on uninstall and needs keep.dependsOn with HelmRelease’s install.crds/upgrade.crds policy.Mention RBAC restrictions on CRD deletion and admission policies.
“helm upgrade automatically upgrades CRDs.”
See Lesson 6 Module 6.
release records approach the 1 MiB limit (#11); many historical Secrets make helm list list operations slow and put pressure on etcd (lower --history-max); slow rendering (many include nested,tpl, large files .Files.Get); waiting on many resources times out; GitOps controllers that render frequently consume CPU.
time helm template,helm get manifest | wc -c, Secret size (diagnostic commands from #11)..helmignore; avoid repeatedly including the same large template inside loops (store it in a variable first); move large config files out of the chart; Helm 4 also improves dependency resolution and content caching.Provide capacity planning: releases per namespace × history-max × average record size.
“Set history-max to 0 (unlimited) to make rollback easier.”
Each team gets one or more namespaces, and releases live inside their namespace (release records are also in the team namespace and are mutually invisible); the team’s deployment identity has only namespace-level Roles; cluster-level objects (CRDs, ClusterRoles, webhooks, IngressClasses) can only be delivered by the platform; ResourceQuota/LimitRange, Pod Security Admission, NetworkPolicy and a policy engine limit what a chart can create.
--take-ownership it can be done with the RBAC permission alone, so RBAC is the real boundary.Mention that release names can repeat across namespaces, but cluster-level object names collide, so cluster-level object names in a chart should include the namespace or release.
“Helm has built-in multi-tenant isolation.”
See Lesson 6 Module 8.
Inventory → compatibility scan → phased cutover → monitoring. Inventory every place that calls Helm (CI images, the Helm version bundled in GitOps controllers, scripts, plugins); scan for old flags and behavioral dependencies (#30, #49, #50); deploy with Helm 4 in non-production first and compare renders and results; keep existing upgrades on client-side merge and plan the SSA switch separately; Helm 3 security fixes run until 2027-02-10, which is the deadline.
--wait=watcher and re-evaluate timeouts; during the transition you can --wait=legacy.--server-side=true, detecting conflicts in staging first (#12).Provide a fallback plan: keep the Helm 3.22 tag in CI images so you can switch back quickly if problems arise.
“Just replace the binary.”
See Lesson 7 Module 7.
The best answer is to “not depend on in-cluster state”: the GitOps repository stores every release’s chart version and values, charts are immutable in OCI, and secrets live in an external secret store; create a new cluster (Terraform) → bootstrap the GitOps controller → rebuild automatically in dependency order (CRDs/platform → data layer → applications); restore stateful data from backups (Velero snapshots, database-native backups). Release history restarts from v1, which is acceptable.
helm list -A -o json and each release’s helm get values, along with the chart version used; or back up the namespace holding release Secrets with Velero.Point out the easily overlooked change in the new cluster’s OIDC issuer.
“Just back up etcd”—restoring etcd across clusters is impractical, and you still have to handle cloud identity and data.
One myapp chart (library standardization + Redis as an optional dependency or externally managed cache), with cloud differences kept only in values (ingress class, identity annotations, storage class); the chart and images are pushed to ACR/ECR (OIDC, signing, immutable tags); the deployment repository, by envs/<cloud>-<env> organizing values and chart versions, deployed via GitOps; Workload Identity / Pod Identity accesses Key Vault / Secrets Manager, and ESO generates the Secret; rollback = git revert; observability and SLO-driven promotion.
# values/aks-prod.yaml
image: { repository: myacr.azurecr.io/myapp, tag: "1.1", digest: "sha256:…" }
serviceAccount:
name: myapp
annotations: { azure.workload.identity/client-id: "11111111-…" }
podLabels: { azure.workload.identity/use: "true" }
ingress: { className: webapprouting.kubernetes.azure.com }
redis: { enabled: false, externalHost: myapp.redis.cache.windows.net }
# values/eks-prod.yaml
image: { repository: 123456789012.dkr.ecr.ca-central-1.amazonaws.com/myapp, tag: "1.1" }
serviceAccount: { name: myapp } # Pod Identity association is configured in Terraform by SA name
ingress: { className: alb, annotations: { alb.ingress.kubernetes.io/scheme: internet-facing } }
redis: { enabled: false, externalHost: myapp.xxxxxx.cache.amazonaws.com }
Proactively cover cost and cleanup (resource groups/regions from Lessons 3 and 4) and disaster recovery (Q49).
Filling the chart with if eq .Values.cloud "aws" branches instead of parameterizing the differences.
A myapp upgrade: the pre-upgrade migration succeeded, the new Pod’s readiness probe failed,--rollback-on-failure and the Deployment was rolled back, but the application still errors. What is the cause, and what improvements should the postmortem recommend?
These deployments took 30 seconds in the Helm 3 era; now --wait they wait until the 10-minute timeout. What are the possible causes and troubleshooting steps?
not ready. status status in the error (#5); compare --wait=legacy.The platform lead wants to know at any time which releases are stuck, failed, or behind on versions. What data would you collect, and how would you implement it?
helm list -A -a -o json + kubectl get secret -l owner=helm exports metadata (without decoding content) as metrics; use the metrics built into Argo CD/Flux; alerts for “pending > 15 minutes”, “failed > 1 hour”, “release record > 700 KB”.No verified video specifically covering Helm production scenario design interviews was found. Storyboard: use Figure 8-1 as the whiteboard, cover Q50 in 5 minutes, and at each arrow point out the corresponding Part A issue number.
Filter by keyword (for example pending,nil,oci,hook). Click a number to jump to the details in the matching module.
First recall the answer from the question, then expand to compare with the one-line key point; for details, return to the matching module’s “Interview question details”.
helm list -A -a # all statuses helm history REL -n NS --max 10 helm status REL -n NS --show-resources helm get all|values|manifest|hooks|metadata REL -n NS [--revision N] kubectl get secret -n NS -l owner=helm,name=REL -L status,version helm rollback REL N -n NS --wait
helm template REL ./chart -f v.yaml --debug --show-only templates/x.yaml helm lint ./chart --strict -f v.yaml helm get values REL -n NS --all helm upgrade … --dry-run=server --hide-secret helm template … | kubeconform -strict -kubernetes-version 1.37.0 helm diff upgrade REL ./chart -n NS # plugin
helm repo update; helm search repo X --versions --devel helm dependency list|build|update ./chart helm registry login HOST # domain only (Helm 4) helm push chart.tgz oci://HOST/PATH helm show chart oci://HOST/PATH/NAME --version V helm install REL oci://HOST/PATH/NAME@sha256:…
--rollback-on-failure # formerly --atomic --force-replace # formerly --force --wait[=watcher|hookOnly|legacy] --timeout 10m --wait-for-jobs --server-side=true|false|auto --force-conflicts --take-ownership --cleanup-on-fail --history-max 20 --reset-then-reuse-values --skip-schema-validation
Each scenario combines several Part A issues. First write down your first diagnostic command and your judgment, then expand the answer.
$ helm history myapp -n myapp --max 3
41 superseded Upgrade complete
42 deployed Upgrade complete
43 pending-upgrade Preparing upgrade
$ kubectl get deploy myapp -n myapp -o jsonpath='{.spec.template.spec.containers[0].image}'
myacr.azurecr.io/myapp:1.2 ← v43’s image is half-committed
Answer: The cancelled job left v43 stuck in pending (#2), while the Deployment was partially updated. Confirm nobody is running it → helm rollback myapp 42 --wait (produces v44, image restored) → redeploy after the fix. Improvements: serialize CI, job timeout > --timeout, and do not interrupt deployment steps on cancellation (Q41).
Error: INSTALLATION FAILED: unable to continue with install: Service "legacy" in namespace "legacy" exists and cannot be imported into the current release: invalid ownership metadata; … (after adding --take-ownership) Error: INSTALLATION FAILED: … Deployment.apps "legacy" is invalid: spec.selector: … field is immutable
Answer: First helm template | kubectl diff, make the chart’s selectorLabels match the existing object (a temporary values override is fine); once takeover succeeds, plan the label migration as a scheduled change.
deploy.sh: helm upgrade myapp corp/myapp --version 1.5.0 -n myapp --reuse-values
Error: UPGRADE FAILED: template: myapp/templates/deployment.yaml:61:30: executing … at <.Values.probes.startup.enabled>: nil pointer evaluating interface {}.enabled
Answer: dev is a fresh install (with the new defaults), while prod uses --reuse-values ignores the 1.5.0-added probes defaults (#18, #14). Change to --reset-then-reuse-values or pass the full values from Git; on the chart side, for newly added parent keys, use dig compatibility; add required to the schema.
$ helm dependency build charts/myapp Error: no repository definition for https://stefanprodan.github.io/podinfo. Please add the missing repos via 'helm repo add' (after the fix) $ helm registry login oci://myacr.azurecr.io/helm … $ helm push … → response status code 401: unauthorized
Answer: A clean runner has no repo definition (#28); the registry login wrote oci:// a URL with a path; Helm 4 accepts only the domain, and the credentials are not stored per host (#30), which causes the push to return 401 (#31). Fix: in CI helm repo add or switch dependencies to OCI; helm registry login myacr.azurecr.io.
Secret/myapp-redis OutOfSync (password changed)
templates/secret.yaml: password: {{ randAlphaNum 24 | b64enc }}
$ helm list -n myapp → empty
Answer: Argo CD generates a new password on every render (#46), lookup does not work in Argo CD (#24), and there is no Helm release here (#45). Fix: existingSecret + External Secrets; a temporary ignoreDifferences does not solve the authentication problem.
helmfile apply: aws-load-balancer-controller deployed myapp Error: … failed calling webhook "mservice.elbv2.k8s.aws": … no endpoints available for service "aws-load-balancer-webhook-service" $ kubectl -n kube-system get pod -l app.kubernetes.io/name=aws-load-balancer-controller CrashLoopBackOff (AccessDenied: … elasticloadbalancing:DescribeLoadBalancers)
Answer: The LBC was installed without --wait and missing IAM permissions made the webhook unavailable (#37); a mismatch between the controller’s SA name and the Pod Identity association causes the same (#38). Fix IAM/association → LBC ready → then deploy the application; in Helmfile, add wait: true and declare on myapp needs.
release A: Error: UPGRADE FAILED: current release manifest contains removed kubernetes api(s) for this kubernetes version … release B: Error: UPGRADE FAILED: create: failed to create: Secret "sh.helm.release.v1.monitoring.v31" is invalid: data: Too long: must have at most 1048576 bytes
Answer: A: the release record contains removed APIs (#48) — use helm-mapkubeapis or rewrite the records per the official docs; scan release records before cluster upgrades. B: the umbrella monitoring chart carries a large amount of dashboard JSON (#11) — move it out of the chart and split the release.
Flag --atomic has been deprecated, use --rollback-on-failure instead
Error: plugin: {Name:./kustomize-wrapper.sh Type:postrenderer/v1} not found
(another release) Error: UPGRADE FAILED: … Apply failed with 1 conflict: conflict with “kubectl-edit” using apps/v1: .spec.replicas
Answer: Old flags (#49); the post-renderer must be changed to a plugin (#50); new releases default to SSA, which conflicts with manual kubectl edit field changes (#12) — once Git is confirmed as the source of truth, --force-conflicts, forbid manual edits; in HPA scenarios, do not render replicas.
Each question has a 2-minute countdown: answer aloud first (you can jot key points in the text box), then expand the reference answer and self-rate as “Got it / Partly / Missed”. When finished, the round score is shown, along with cumulative mastery rates by module. Self-rating results are saved in this browser.
helm upgrade --install steps, and mark at which step #1, #2, #4, #5, #6, #11 and #12 each occur.crds/ versus placing them in templates/ ; what are the consequences of each?| Topic | Conclusions used in this course | Source (accessed 2026-11-15) |
|---|---|---|
| Helm 4 changes overview | --atomic → --rollback-on-failure, --force → --force-replace; new installs default to SSA, upgrades and rollbacks keep the original method; kstatus; plugin system (optional Wasm; CLI/getter/postrenderer); post-renderers must be plugins; install OCI by digest; registry login accepts only domains; Chart API v3 is experimental | helm.sh/docs/overview |
| helm install / upgrade flags | --wait (watcher/hookOnly/legacy; hookOnly when omitted), --timeout default 5m, --server-side, --force-conflicts, --take-ownership, --history-max default 10, --reset-then-reuse-values, --dry-run=client|server, --hide-secret, --skip-schema-validation | helm install · helm upgrade |
| Exact error messages | cannot reuse a name that is still in use; another operation (install/upgrade/rollback) is in progress; has no deployed releases; exists and cannot be imported into the current release: invalid ownership metadata; failed pre-install / pre-upgrade hooks failed; YAML parse error on; parse error at; execution error at; values don't meet the specifications of the schema(s); chart requires kubeVersion; looks like … is not a valid chart repository; no repository definition for; found in Chart.yaml, but missing in charts/ directory; chart reference digest mismatch; current release manifest contains removed kubernetes api(s); release has no %d version; kubernetes cluster unreachable; resource … not ready. status; Flag --atomic has been deprecated | Helm v4.3.2 source code (pkg/action, pkg/engine, pkg/kube, pkg/registry, pkg/downloader, pkg/cmd) |
| Hooks | phases, weights, deletion policies (default before-hook-creation if unset), helm.sh/hook-output-log-policy | Chart Hooks · source pkg/release/v1/hook.go |
| CRD | crds/ install only; not upgraded or deleted | CRD best practices |
| OCI | push/pull; in tags + → _ | Registries · source pkg/registry/reference.go |
| Schema | values.schema.json; Helm 4.3 uses santhosh-tekuri/jsonschema v6 | Schema Files · source pkg/chart/common/util/jsonschema.go |
| Removed APIs | helm-mapkubeapis, manually rewriting release records | Deprecated Kubernetes APIs |
| Server-Side Apply | Field managers, conflicts and force | Kubernetes docs |
| Argo CD / Flux | Argo CD renders then applies, with hook mapping; Flux helm-controller uses the Helm SDK, remediation | Argo CD Helm · Flux HelmRelease |
| ACR / ECR / AKS / EKS | ACR Helm OCI, ECR pushes require pre-created repositories, kubelogin, EKS access entries | ACR · ECR · kubelogin · EKS access entries |
All videos were verified on 2026-11-15 via the YouTube oEmbed endpoint (https://www.youtube.com/oembed?url=…&format=json) to verify titles and channels; oEmbed does not return durations or publish dates, so these are not shown. Verified: TechWorld with Nana “What is Helm in Kubernetes? Helm and Helm Charts explained | Kubernetes Tutorial 23” (-ykwb1d0DXU), “ArgoCD Tutorial for Beginners | GitOps CD for Kubernetes” (MeU5_k9ssrs); DevOps Hint “How to use helm lint, helm –debug –dry run, and helm template | How to Troubleshoot Errors in Helm” (5tHWBVbNmq0); Rahul Wagh “Helm Upgrade Command | How to use Helm Upgrade Command - Part 12” (6ua2LBzPfxo), “Complete Helm Chart Tutorial: From Beginner to Expert Guide” (DQk8HOVlumI); SP Nexa DevOps “Helm Charts Kubernetes Release Lifecycle: Upgrade, Rollback & Dependencies | Part 6” (5XnEK_aPl-U); That DevOps Guy “Introduction to Helm | Kubernetes Tutorial | Beginners Guide” (5_J7RWLLVeQ); Akuity “How to Use Private OCI Helm Repositories in Argo CD” (Hn4pgrySYRU); Terry Howe “Helm with oras-go v3 Demo Mirroring and Blocking Registries” (3yPa6mz0nas); IBM Technology “What is Helm?” (fy8SHvNZGeE); KodeKloud “What is Helm? | Helm Concepts Explained | KodeKloud” (kJscDZfHXrQ); DevOps Journey “How to Create Helm Charts - The Ultimate Guide” (jUYNS90nq8U), “Helm and Helm Charts Explained - Helm Tutorial for Beginners” (w51lDVuRWuk); CNCF “Building Helm Charts From the Ground Up: An Introduction to Kubernetes [I] - Amy Chen, Heptio” (vQX5nokoqrQ); Anton Putra “AWS Load Balancer Controller Tutorial (TLS): AWS EKS Kubernetes Tutorial - Part 6” (5XpPiORNy1o); Containers from the Couch “EKS Pod Identity vs IRSA | Securely Connect Kubernetes Pods to AWS Services” (aUjJSorBE70); Jon Gallant “Connect to Azure from a GitHub Action with OpenID Connect (OIDC)” (IKuw9T6vZYU); Microsoft Developer “Introduction to External Secrets - Secrets Operator for Kubernetes” (2FOB49oXts8); DevOps & AI Toolkit “Manage Kubernetes Secrets With External Secrets Operator (ESO)” (SyRZe5YVCVk). Most of these videos are based on Helm 3; for Helm 4 parameters and behavior, refer to this course and helm.sh. No verified videos specifically covering Helm production troubleshooting, Helm 4 migration, or Helm interview questions were found; the related pages provide storyboard scripts instead.
The “Voice” page uses the browser’s built-in Web Speech API and uploads no data. A Chinese (zh-CN) voice pack must be installed on the system; without one, you can read the script directly.
1 error occurred:) and the parts from the Kubernetes API server, client-go, registry, cloud services (Entra, ECR) and Flux/Argo CD may change between versions; entries are marked “wording varies by version”. Helm 3’s older wording (such as cannot re-use a name…,rendered manifests contain a resource that already exists,timed out waiting for the condition) is also listed to make searching easier.helm create Generated template details (line numbers, indentation, whether httproute.yaml is included) vary slightly by version; the labs already give manual adjustment hints.