Why helm upgrade --install failed when previous install is failure?

8/9/2018

This is the helm and tiller version:

> helm version --tiller-namespace data-devops
Client: &version.Version{SemVer:"v2.9.1", GitCommit:"20adb27c7c5868466912eebdf6664e7390ebe710", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.9.1", GitCommit:"20adb27c7c5868466912eebdf6664e7390ebe710", GitTreeState:"clean"}

The previous helm installation failed:

helm ls --tiller-namespace data-devops
NAME            REVISION        UPDATED                         STATUS  CHART                   NAMESPACE
java-maven-app  1               Thu Aug  9 13:51:44 2018        FAILED  java-maven-app-1.0.0    data-devops

When I tried to install it again using this command, it failed:

helm --tiller-namespace data-devops upgrade java-maven-app helm-chart --install \
        --namespace data-devops \
        --values helm-chart/values/stg-stable.yaml
Error: UPGRADE FAILED: "java-maven-app" has no deployed releases

Is the helm upgrade --install command going to fail, if the previous installation failed? I am expecting it to force install. Any idea?

-- Agung Pratama
kubernetes
kubernetes-helm

3 Answers

4/2/2020

Try:

helm delete --purge <deployment> 

This will do the trick

-- Dhiraj Surve
Source: StackOverflow

3/4/2020

Just to add...

I have often seen the Error: UPGRADE FAILED: "my-app" has no deployed releases error in Helm 3. Almost every time, the error was in either kubectl, aws-cli or aws-iam-authenticator not Helm. Seems that a lot of problems seem to bubble-up to this exception, which is not ideal.

To diagnose the true issue you can run simple commands in one or more of these tools if you are using them and you should be able to quickly diagnose your problem.

For example:

aws-cli - aws --version to ensure you have the cli installed.

aws-iam-authenticator - aws-iam-authenticator version to check that this is correctly installed.

kubectl - kubectl version will show if the tool is installed.

kubectl - kubectl config current-context will show if you have provided a valid config that can connect to Kubernetes.

-- JDTLH9
Source: StackOverflow

8/10/2018

This is or has been a helm issue for a while. It only affects the situation where the first install of a chart fails and has up to helm 2.7 required a manual delete of the failed release before correcting the issue and installing again. However there is now a --force flag available to address this case - https://github.com/helm/helm/issues/4004

-- Ryan Dawson
Source: StackOverflow