All Articles

Helm Upgrade Failed: Another Operation is in Progress — Fix It Fast

Getting 'Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress' in Helm? Here's exactly why it happens and how to fix it in under 2 minutes.

DevOpsBoysMar 30, 20263 min read
Share:Tweet

You're deploying a release and Helm throws this at you:

Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress

Your pipeline is blocked. The release won't deploy. And rerunning the command just gives the same error.

Here's exactly what's happening and how to fix it.


Why This Happens

Helm tracks release state using Secrets inside your Kubernetes namespace. When a Helm operation starts, it sets the release status to pending-upgrade (or pending-install, pending-rollback).

If that operation crashes mid-way — killed pipeline, network drop, pod OOM, your laptop closed — Helm never gets to update that status back to deployed.

Next time you run helm upgrade, Helm sees pending-upgrade and refuses to proceed.


Step 1: Check the Stuck Release Status

bash
helm list -n <your-namespace> -a

The -a flag shows all statuses including pending-upgrade. Look for:

NAME        NAMESPACE   REVISION   STATUS           CHART
my-app      production  3          pending-upgrade  my-app-1.2.0

If you see pending-upgrade, pending-install, or pending-rollback — that's your problem.


Step 2: Find the Helm Secret Directly

Helm stores release state as Kubernetes secrets named sh.helm.release.v1.<name>.v<revision>:

bash
kubectl get secrets -n <your-namespace> | grep helm

Output:

sh.helm.release.v1.my-app.v1   helm.sh/release.v1   1      5d
sh.helm.release.v1.my-app.v2   helm.sh/release.v1   1      2d
sh.helm.release.v1.my-app.v3   helm.sh/release.v1   1      10m

The latest revision (v3 here) is the stuck one.


Step 3: Fix It — Roll Back to Last Good State

The safest fix is to rollback to the previous working revision:

bash
helm rollback my-app 2 -n <your-namespace>

This rolls back to revision 2 and sets the status back to deployed. Now your helm upgrade will work again.


Alternative Fix: Manually Delete the Stuck Secret

If rollback isn't an option (first install that got stuck), delete the pending secret directly:

bash
# Get the stuck revision number from helm list -a
kubectl delete secret sh.helm.release.v1.my-app.v3 -n <your-namespace>

Then retry your install or upgrade.

⚠️

Warning: Only delete the stuck pending revision secret, NOT previous deployed revision secrets. Those are your rollback history.


Root Cause: Why Did the Operation Get Stuck?

Common reasons:

CauseWhat to Check
CI/CD pipeline was cancelled mid-deployCheck pipeline logs
Pre-install/pre-upgrade hook job failedkubectl get jobs -n <ns>
Kubernetes API timeoutCheck cluster health
Helm process was killed (OOM)Check runner resource limits
Network disconnected during deployUsually in local dev

Fix the Root Cause: Add Atomic Deploys

Use --atomic flag in your Helm upgrades. If the upgrade fails, Helm automatically rolls back and cleans up the pending state:

bash
helm upgrade my-app ./chart \
  --install \
  --atomic \
  --timeout 5m \
  --namespace production

With --atomic, you'll never get a stuck pending-upgrade state from a mid-deploy failure again.


In GitHub Actions / GitLab CI

If this keeps happening in CI, add cleanup as a pre-step:

yaml
- name: Check and fix stuck Helm releases
  run: |
    STATUS=$(helm status my-app -n production -o json 2>/dev/null | jq -r '.info.status' || echo "not-found")
    if [[ "$STATUS" == "pending-upgrade" || "$STATUS" == "pending-install" ]]; then
      echo "Found stuck release, rolling back..."
      helm rollback my-app 0 -n production || true
    fi
 
- name: Deploy
  run: |
    helm upgrade my-app ./chart --install --atomic --timeout 5m -n production

Quick Reference

bash
# See all releases including stuck ones
helm list -n <namespace> -a
 
# Rollback to last good revision
helm rollback <release-name> <revision> -n <namespace>
 
# Find stuck helm secrets
kubectl get secrets -n <namespace> | grep helm
 
# Delete stuck secret (last resort)
kubectl delete secret sh.helm.release.v1.<name>.v<revision> -n <namespace>
 
# Prevent it: always use --atomic
helm upgrade <name> <chart> --install --atomic --timeout 5m

Still Stuck?

If you're managing Helm releases at scale, consider using ArgoCD or Flux — they handle rollbacks and state recovery automatically without you ever needing to debug Helm secrets manually.

Looking to level up your Kubernetes skills? KodeKloud's CKA course is the best structured path — covers Helm, troubleshooting, and everything in between.


The pending-upgrade error looks scary but it's a 2-minute fix once you know where to look. Use --atomic going forward and you'll rarely see it again.

Newsletter

Stay ahead of the curve

Get the latest DevOps, Kubernetes, AWS, and AI/ML guides delivered straight to your inbox. No spam — just practical engineering content.

Related Articles

Comments