DEV Community

Maxime Guilbert
Maxime Guilbert

Posted on • Updated on

How to fix Helm's "Upgrade Failed: has no deployed releases" error

When you are using the command helm upgrade --install, you may think that it will always work and rollback in case of a failure. But sometimes, it happens that another error can appear.

Upgrade error

Error: UPGRADE FAILED: "..." has no deployed releases

The first time you will see it, you may don't understand what's going on. Especially if it's you already install multiple release of a project with the same command, because you will see all your elements on your cluster and the secrets related to each releases.

How to correct it

Update secret

To correct it, it's quite easy. You just need to update the last secret related to your release.

In it, there is a label called status.

Change its value to deployed, then reuse your "helm upgrade --install" command and it will works !

Use a Kubernetes command

You can use the following command to resolve your issue directly

kubectl patch secret [release secret] --type=merge -p '{"metadata":{"labels":{"status":"deployed"}}}' -n [namespace]

Recreate release

Another way to correct this issue is to delete the release

helm uninstall [release name]

and reinstall it.

helm install [release name] ...

or

helm upgrade --install [release name] ...

WARNING

If you are using this solution, you must be aware that the service deployed with the release will be unavailable during a period of time!

I'm talking about this possibility, just let you aware about this possibility.


I hope it will help you! 🍺

Top comments (2)

Collapse
 
vadascale profile image
Victor ADĂSCĂLIȚEI

Thank you, Maxime! You're a life saver!

Collapse
 
mxglt profile image
Maxime Guilbert

I'm really happy it helps you! :)