Helm UPGRADE FAILED: why your Helm upgrade failed and how to fix it
Reproduced on k3s v1.31.5 (k3d) with kubectl v1.36.1 and Helm v3.19.0. The has no deployed releases message did not appear with this Helm version.
What you see
$ helm upgrade web ./web -n lab --set image=nginx:9.99-doesnotexist --wait --timeout 60s
Error: UPGRADE FAILED: context deadline exceeded
$ kubectl get pods -n lab
NAME READY STATUS RESTARTS AGE
web-6d9b4b868d-rts79 1/1 Running 0 2m16s
web-7689d569b7-7d2r6 0/1 ImagePullBackOff 0 61s
$ helm upgrade web ./web -n lab --set image=nginx:1.27-alpine
Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress
$ helm history web -n lab
REVISION UPDATED STATUS CHART APP VERSION DESCRIPTION
1 Mon Nov 23 20:40:11 2026 deployed web-0.1.0 1.27 Install complete
2 Mon Nov 23 20:41:26 2026 failed web-0.1.0 1.27 Upgrade "web" failed: context deadline exceeded
3 Mon Nov 23 20:42:33 2026 pending-upgrade web-0.1.0 1.27 Preparing upgrade
$ kubectl get secrets -n lab -l owner=helm,name=web --show-labels
NAME TYPE DATA AGE LABELS
sh.helm.release.v1.web.v1 helm.sh/release.v1 1 2m29s modifiedAt=1795466481,name=web,owner=helm,status=deployed,version=1
sh.helm.release.v1.web.v2 helm.sh/release.v1 1 74s modifiedAt=1795466481,name=web,owner=helm,status=failed,version=2
sh.helm.release.v1.web.v3 helm.sh/release.v1 1 7s createdAt=1795466553,modifiedAt=1795466481,name=web,owner=helm,status=pending-upgrade,version=3
$ helm rollback web 1 -n lab --wait
Rollback was a success! Happy Helming!
$ helm upgrade web ./web -n lab --set selectorApp=web2
Error: UPGRADE FAILED: cannot patch "web" with kind Deployment: Deployment.apps "web" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app":"web2"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable
$ helm history jobs -n lab
REVISION UPDATED STATUS CHART APP VERSION DESCRIPTION
1 Mon Nov 23 20:43:33 2026 pending-install web-0.1.0 1.27 Initial install underway
$ helm rollback jobs -n lab
Error: release has no 0 versionWhat it means
Helm keeps each release as a set of Secrets in the release's namespace, one per revision. A status label on each Secret says deployed, failed, superseded, pending-install, pending-upgrade or pending-rollback. Helm reads this history before every upgrade.
If the latest revision is still pending, Helm will not start a new operation. It prints another operation (install/upgrade/rollback) is in progress. This is a lock, not a crash. It stays behind when the helm process that took it is killed, for example a CI job that was cancelled. In our lab, killing helm during an upgrade left revision 3 in pending-upgrade until we rolled back.
With --wait, Helm also waits for the new pods to become ready. If they are not ready before --timeout, the upgrade fails with context deadline exceeded and the revision is marked failed. The objects it applied stay in the cluster. Helm does not undo them unless you pass --atomic.
Common causes
A previous helm run was interrupted
A CI job was cancelled, a runner died or someone pressed Ctrl+C while helm was working. The pending revision it wrote is never closed, so every later upgrade is refused.
How to tell: another operation (install/upgrade/rollback) is in progress. The latest revision in the history is pending-upgrade, pending-install or pending-rollback and no helm process is running.
Two deploys ran at the same time
Two pipelines, or a person and a pipeline, upgrade the same release at once. The second one finds the lock the first one holds.
How to tell: The same another operation error, but the pending revision is only seconds old. It clears by itself when the first run ends.
The new pods never became ready under --wait
A wrong image tag, a crash on start or a failing readiness probe keeps the rollout from finishing. Helm gives up at --timeout and marks the revision failed. The old pods keep serving.
How to tell: UPGRADE FAILED: context deadline exceeded. kubectl get pods shows a new pod in ImagePullBackOff, CrashLoopBackOff or 0/1 Running next to the old one.
The chart changes a field Kubernetes will not change
Some fields cannot be edited after an object is created, such as a Deployment's selector or a Job's pod template. The API server rejects the patch and nothing is applied.
How to tell: cannot patch "<name>" with kind <Kind> ... field is immutable in the error and in the revision's description.
The first install never finished
A release whose only revision is pending-install has nothing to roll back to. Older Helm versions also printed has no deployed releases when the first install had failed. With Helm v3.19.0 we could not trigger that message: an upgrade of a release whose only revision was failed went through.
How to tell: The history has a single revision with status pending-install or failed. helm rollback answers release has no 0 version.
How to diagnose it
kubectl get secrets -n <namespace> -l owner=helm,name=<release> --show-labelsEach Secret is one revision. The status label shows pending-upgrade or pending-install for a stuck lock and failed for a failed upgrade. helm history <release> -n <namespace> shows the same list with the error text.
kubectl get pods -n <namespace>Look for new pods in ImagePullBackOff, CrashLoopBackOff or 0/1 Running next to the old ones. They are why --wait timed out.
kubectl rollout status deployment/<name> -n <namespace> --timeout=30sIt waits for the same thing helm --wait waits for. In our lab it printed deployment "<name>" exceeded its progress deadline for the stuck rollout.
kubectl get events -n <namespace> --sort-by=.lastTimestampFailed image pulls, back-off restarts and probe failures from the upgrade show up here, newest last.
kubectl describe deployment <name> -n <namespace>Compare the selector, image and resources with the new chart values. A selector that differs from the new values explains a field is immutable error.
How to fix it
Roll back to the last good revision
Pick the last revision with status deployed or superseded that worked and roll back to it. This also clears a pending-upgrade lock. In our lab it worked on a release stuck in pending-upgrade. Then fix the chart or values and upgrade again.
helm history <release> -n <namespace>
helm rollback <release> <revision> -n <namespace> --waitTrade-off: A rollback is a new revision that reapplies the old manifests. It does not undo database migrations or other changes made by hooks or by the app.
Remove a release stuck in pending-install
When the only revision is pending-install, there is no revision to roll back to. Uninstall the release and install it again.
helm uninstall <release> -n <namespace>
helm install <release> <chart> -n <namespace> --waitTrade-off: Uninstall deletes every object the release created, including any PersistentVolumeClaims the chart itself defines. Only do this when there is nothing in the release to keep.
Let one deploy run at a time
If another pipeline is still upgrading the release, wait for it to finish. Then make your CI queue deploys per release so two runs never overlap.
Trade-off: Queued deploys wait for each other. When many changes land together, each one reaches the cluster later.
Keep immutable fields the same
Put the old selector or Job template back in the values. If it really has to change, delete that one object or give it a new name. Helm then creates it again.
Trade-off: Deleting a Deployment removes its pods. The app is down until the new pods are ready, unless you run the old and new names side by side for a while.
Use --atomic for unattended upgrades
With --atomic, Helm rolls the release back when the upgrade fails, so it is never left on a failed revision. It turns on --wait.
helm upgrade <release> <chart> -n <namespace> --atomic --timeout 5mTrade-off: The rollback also removes the evidence. The failed pods are gone by the time you look, so save the events and logs in the pipeline before it ends.
How to stop it coming back
- Give CI jobs a timeout longer than helm's own --timeout, so helm can finish and record the result instead of being killed.
- Let only one pipeline at a time deploy a given release.
- Never change a Deployment's selector labels in a chart once the release is live.
- Alert on releases whose latest revision is failed or pending.
How KubeGraf investigates it
KubeGraf watches your clusters for failures such as CrashLoopBackOff, OOMKilled pods and stuck rollouts. How KubeGraf handles Kubernetes incidents.
Frequently asked questions
What does another operation (install/upgrade/rollback) is in progress mean?
The latest revision of the release is still marked pending, so Helm will not start a new one. Either another helm run is still working or an earlier run was killed before it finished. If nothing is running, roll back to the last good revision to clear it.
How do I fix has no deployed releases?
It means the release has no revision with status deployed, usually because the first install failed. Uninstall the release and install it again if there is nothing in it to keep. Newer Helm versions can often upgrade such a release directly.
How do I roll back a failed Helm upgrade?
Run helm history to find the last revision that worked. Then run helm rollback with the release name and that revision number. The rollback becomes a new revision in the history.
Why does helm upgrade say context deadline exceeded?
The upgrade used --wait and the new pods were not ready before --timeout. Look at the new pods for ImagePullBackOff, CrashLoopBackOff or a failing readiness probe.
Last updated . Try KubeGraf Freemium.
Related
- Argo CD OutOfSync / Degraded
- ImagePullBackOff
- CrashLoopBackOff
- A Helm upgrade that did not finish
- Kubernetes Deployment Rollback: Manual vs Automated