Ravindra BagaleCourses & study guides मराठी

Chapter 85: Helm for Kubernetes

DevOps

85.9 Troubleshooting common Helm errors

Story. Vikram's upgrade failed with cannot patch ... field is immutable. He had changed a Deployment's spec.selector. Helm tried to patch; Kubernetes refused. He learned to read helm status, helm get manifest, and events from kubectl together.

Why

Most Helm failures are Kubernetes reject messages wrapped in a release error. Fix the rendered YAML, not "Helm itself".

What — quick table

Symptom Likely cause What to run
cannot re-​use a name Release already exists helm upgrade --​install or uninstall first
field is immutable Changed selector or other immutable field Roll forward with a new resource name or delete carefully
rendered manifests contain a resource that already exists Object created outside Helm helm adopt patterns or delete orphan / use correct release labels
Empty templates Wrong Values path helm template and check {{ .Values... }}
RBAC forbidden ServiceAccount cannot create objects Fix RoleBinding for the installing identity

Example 1: Status and hooks

helm status hello -n lab
kubectl get events -n lab --sort-by=.lastTimestamp | tail

Example 2: See what Helm last sent

helm get manifest hello -n lab | head
helm get values hello -n lab

Example 3: Failed release cleanup

helm list -n lab --all
helm uninstall hello -n lab

What it shows: --all includes failed/pending-install releases you can uninstall.

Ravindra Bagale's Tip

When an upgrade fails, run helm history and helm get manifest for the last good revision before you delete anything.

Quick quiz

Q1. What often causes immutable field errors?

Changing Deployment selectors or other immutable spec fields.

Q2. How do you list failed releases too?

helm list --all

Q3. Where do you see rendered live YAML?

helm get manifest RELEASE -n NS

Did you understand? Let us try it once more.