Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

helm upgrade failed with error has no deployed releases #7160

Closed
damodhar22 opened this issue Dec 5, 2019 · 13 comments
Closed

helm upgrade failed with error has no deployed releases #7160

damodhar22 opened this issue Dec 5, 2019 · 13 comments

Comments

@damodhar22
Copy link

I tried to do an helm upgrade it failed saying: has no deployed releases. The expected behavior is that it should install the chart as the option --install is provided

helm upgrade --install --force myapp ./test
Error: UPGRADE FAILED: "myapp" has no deployed releases

Output of helm version:v3.0.0

Output of kubectl version:v1.15.0

Cloud Provider/Platform (AKS, GKE, Minikube etc.): EKS

@marckhouzam
Copy link
Member

I've seen this when there is a failed release. Try doing: helm list --all-namespaces -a
That -a flag is important.

@aaronmell
Copy link

aaronmell commented Dec 8, 2019

I'm curious if this is the correct behavior. If a release is in a failed state it cannot be upgraded. This seems to differ from helm v2, where it was possible to upgrade a failed release.

Upgrading a release calls this code, and always passes
"status": "deployed",

ls, err := s.Driver.Query(map[string]string{

So any releases in a failed state would not be returned, and helm will error with the "no deployed releases" message.

@damodhar22
Copy link
Author

damodhar22 commented Dec 9, 2019

I'm curious if this is the correct behavior. If a release is in a failed state it cannot be upgraded. This seems to differ from helm v2, where it was possible to upgrade a failed release.

Upgrading a release calls this code, and always passes
"status": "deployed",

ls, err := s.Driver.Query(map[string]string{

So any releases in a failed state would not be returned, and helm will error with the "no deployed releases" message.

If upgrading a failed state is not a correct behavior, it should allow to install the release as we are giving the option --install in upgrade scenario

@mgcrea
Copy link

mgcrea commented Dec 12, 2019

Encountering this as well today with helm@3.0.1, I have a release deployed through helm a few weeks ago and today the release can't be found. Nothing in helm list --all-namespaces -a, but the release is properly running. Never happened to me on the 2.x branch.

@marckhouzam
Copy link
Member

@mgcrea did you deploy your release with helm 3 or helm 2? Helm 3 doesn't see the releases of helm 2, or vice versa.

@mgcrea
Copy link

mgcrea commented Dec 12, 2019

@marckhouzam it was with helm 3, maybe I did something funky trying to upgrade it. Had a release name == namespace name, not sure if it can cause such kind of issues.

@hickeyma
Copy link
Contributor

hickeyma commented Dec 13, 2019

@mgcrea There are breaking changes if releases were deployed using pre GA versions of Helm 3 (like alphas, betas, rcs) and Helm 3 GA

@bacongobbler
Copy link
Member

closing as a duplicate of #5595.

@abdennour
Copy link

fixed by kubectl -n $namespace delete secret -lstatus=pending-upgrade
Run now helm again.

@sajtrus
Copy link

sajtrus commented Oct 20, 2020

I had issues with helm upgrade and it lead me here. It was solved by adding -n <namespace>. Maybe it will help someone out there.

@AlbinoDrought
Copy link

Similar to @abdennour , kubectl -n $namespace delete secret -lstatus=pending-install for me after installing a chart with broken pre-install hooks

@qb14cj
Copy link

qb14cj commented Jan 14, 2021

@sajtrus Thanks for comment. Added the namespace, and my upgrade executed. @mgcrea Apparently helm runs same as kubectl. To get helm list for a specific namespace, include -n $namespace. In both cases, for default namespace, leave blank.

@wasim-nihal
Copy link

I had the same issue while trying to upgrade my helm chart using helm client-go package. I was getting the below error each time while trying to upgrade using func (helmclient.Client).InstallOrUpgradeChart function of helm client.
**my-chart-test" has no deployed releases**

When I did helm list on my namespace, my chart was not listed there. So, I has to explicitly trigger a helm uninstall my-chart-test -n my-namespace and install again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests