Issue#

A helm upgrade was interrupted by a CI timeout, a Ctrl+C, or a lost connection. Every later upgrade or install of the same release fails right away:

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

helm list may not show the release at all. helm list -a shows it with a status like pending-upgrade, pending-install or pending-rollback.

Cause#

Helm 3 stores each release revision as a Secret in the release namespace. Before it changes anything, Helm sets the new revision to a pending-* status. If the client dies before it finishes, that status is never updated. Helm then treats the release as locked and refuses any further operation on it.

Solution#

  1. Find the stuck release and its status:
NAMESPACE=myapp-ns RELEASE=myapp helm list -n "$NAMESPACE" --pending helm history "$RELEASE" -n "$NAMESPACE"
  1. If the status is pending-upgrade or pending-rollback, roll back to the last revision with status deployed:
# Example: revision 4 was the last "deployed" one helm rollback "$RELEASE" 4 -n "$NAMESPACE" --wait
  1. If the status is pending-install (revision 1, never deployed), there is nothing to roll back to. Uninstall the release and install it again:
helm uninstall "$RELEASE" -n "$NAMESPACE" helm install "$RELEASE" ./chart -n "$NAMESPACE" -f values.yaml
  1. If you can't roll back or uninstall the release (for example, it is in production and you don't want a rollback), delete only the stuck revision Secret. First list the release Secrets and their status labels:
kubectl get secrets -n "$NAMESPACE" \ -l owner=helm,name="$RELEASE" \ -L status,version

Delete the Secret that shows the pending-* status:

kubectl delete secret -n "$NAMESPACE" sh.helm.release.v1.${RELEASE}.v5

Helm now sees the previous deployed revision as current, so you can run the upgrade again.

  1. To prevent this, have failed upgrades roll back automatically, and use a timeout longer than the CI job's own timeout:
helm upgrade --install "$RELEASE" ./chart -n "$NAMESPACE" \ -f values.yaml --atomic --timeout 10m

Tip: Two pipelines deploying the same release at the same time also cause this error. Serialize deployments per release, for example with a concurrency group in your CI.

Verify#

helm status "$RELEASE" -n "$NAMESPACE" helm history "$RELEASE" -n "$NAMESPACE" --max 5

The latest revision should show STATUS: deployed. A new helm upgrade should now complete without the "another operation is in progress" error.