Helm 3 has been out for a while now and for the most part it’s a good step up from Helm 2 however it does have one issue which if you don’t know how to deal with can be frustrating and difficult to resolve. The issue I’m referring to occurs when the first deployment of an app fails for some reason, subsequent deployments will then throw a failure message with the text “app-name has no deployed releases”.
This issue can easily occur if you’re using Helm to deploy from a pipeline and make a small mistake somewhere in the pipeline configuration process. This issue is well know and has a very active GitHub issue which can be found here, there is also a pull request which attempts to resolve the issue however at time of writing it is yet to merge (see PR7653). If you read the GitHub issue and comments you’ll see there are a few solutions out there, I’ve not had much luck with any of them so I came up with my own. You’re going to need to have kubectl installed locally and configured for your Kubernetes instance.
This fix is pretty much a clean-up operation and we are going to remove all traces of the broken deployment. For this example my app is called “akshelm3issue” and my namespace is “ingress-basic”. We are going to start by deleting the secret associated against our app so let’s list all secrets so we can find the one we want.
kubectl get secrets --show-labels -n ingress-basic
This will list all the secrets for the namespace, the one we are after will contain our app name within it.
Now we’ve got that we can start the clean-up. Let’s delete that secret…
kubectl delete secret sh.helm.release.v1.akshelm3issue.v1 -n ingress-basic
The rest of the clean-up is pretty straight forward and all we need is the app name and the namespace so let’s get on with it.
kubectl delete service akshelm3issue -n ingress-basic kubectl delete deployment akshelm3issue -n ingress-basic kubectl delete ingress akshelm3issue -n ingress-basic
You may get some messages stating that what you’ve attempted to delete does not exist, this will vary depending on how far your initial deployment got before it failed. That should be it! Fix whatever issue caused the initial deployment to fail and redeploy, hopefully you’re greeted with a nice green tick.