helm: helm 3 beta 5, cannot uninstall releases done by same ver

there are always release secrets that cannot be removed automatically.

helm3 uninstall nginx-ingress -n ingress-nginx
Error: uninstallation completed with 1 error(s): uninstall: Failed to purge the release: delete: failed to get release "sh.helm.release.v1.nginx-ingress.v1": release: not found

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17 (11 by maintainers)

Most upvoted comments

@masterkain Sorry about the issue. The issue here is, there was a breaking change in between the beta releases, where we changed the way releases are stored - the names of the secrets / configmaps basically. This breaking change happened in bet4. So, if you used v3-beta3 or older versions to install, then you will have to use those to delete the releases.

Here’s an example of what I’m telling

$ helm3-beta3 install test --generate-name
NAME: test-1572068781
LAST DEPLOYED: 2019-10-26 11:16:21.782769 +0530 IST m=+0.098977586
NAMESPACE: default
STATUS: deployed
NOTES:
1. Get the application URL by running these commands:
  export POD_NAME=$(kubectl get pods -l "app=test,release=test-1572068781" -o jsonpath="{.items[0].metadata.name}")
  echo "Visit http://127.0.0.1:8080 to use your application"
  kubectl port-forward $POD_NAME 8080:80
$ k get secrets
NAME                  TYPE                                  DATA   AGE
default-token-dzgwv   kubernetes.io/service-account-token   3      71d
draft-pullsecret      kubernetes.io/dockercfg               1      68d
test-1572068781.v1    helm.sh/release                       1      5s
$ helm3-beta4 list
NAME            NAMESPACE       REVISION        UPDATED                                 STATUS          CHART     A
PP VERSION
test-1572068781 default         1               2019-10-26 11:16:21.782769 +0530 IST    deployed        test-0.1.01
.16.0
$ helm3-beta4 delete test
Error: uninstall: Release not loaded: test: release: not found
$ helm3-beta4 delete test-1572068781
Error: uninstallation completed with 1 error(s): uninstall: Failed to purge the release: delete: failed to get rele
ase "sh.helm.release.v1.test-1572068781.v1": release: not found
$ helm3-beta3 delete test-1572068781
release "test-1572068781" uninstalled

When installing with helm3-beta4, this is how secrets will look:

$ helm3-beta4 install test test
NAME: test
LAST DEPLOYED: Sat Oct 26 11:20:11 2019
NAMESPACE: default
STATUS: deployed
REVISION: 1
NOTES:
1. Get the application URL by running these commands:
  export POD_NAME=$(kubectl get pods -l "app=test,release=test" -o jsonpath="{.items[0].metadata.name}")
  echo "Visit http://127.0.0.1:8080 to use your application"
  kubectl port-forward $POD_NAME 8080:80
$ k get secrets
NAME                         TYPE                                  DATA   AGE
default-token-dzgwv          kubernetes.io/service-account-token   3      71d
draft-pullsecret             kubernetes.io/dockercfg               1      68d
sh.helm.release.v1.test.v1   helm.sh/release.v1                    1      5s
$ helm3-beta3 list
NAME    NAMESPACE       REVISION        UPDATED                                 STATUS          CHART
test    default         1               2019-10-26 11:20:11.80007 +0530 IST     deployed        test-0.1.0
$ helm3-beta3 delete test
Error: uninstallation completed with 1 error(s): uninstall: Failed to purge the release: delete: failed to get rele
ase "test.v1": release: not found
$ helm3-beta4 delete test
release "test" uninstalled

As you can see helm3-beta4 (or newer) releases cannot be deleted by older versions