I am using helm v3.0.0-alpha.2 on Kubernetes v1.15.3.
[root@somebox log]# helm version
version.BuildInfo{Version:"v3.0.0-alpha.2", GitCommit:"97e7461e41455e58d89b4d7d192fed5352001d44", GitTreeState:"clean", GoVersion:"go1.12.7"}
helm list
shows no releases.
[root@somebox log]# helm list
NAME NAMESPACE REVISION UPDATED STATUS CHART
Yet I cannot install a new release and give it a name because it is 'still in use'. It was a release at some point, but should no longer exist.
[root@somebox log]# helm install --namespace rook-ceph rook-ceph-acme rook-release/rook-ceph
Error: cannot re-use a name that is still in use
How can I clear out old releases that are not showing up with helm list
?
Thanks.
If you need to uninstall the deployed release, run the delete command on the Helm command line. The command removes all the Kubernetes components that are associated with the chart and deletes the release.
To delete all Helm releases in Linux(in Helm v2. X) with a single command, you can use some good old bash. Just pipe the output of helm ls --short to xargs , and run helm delete for each release returned. Adding --purge will delete the charts as well, as per @Yeasin Ar Rahman's comment.
To remove the pods, list the pods with kubectl get pods and then delete the pods by name. To delete the Helm release, find the Helm release name with helm list and delete it with helm delete .
First, you have to list the releases with the namespace assigned to it. Second, you have to purge all the releases in helm2
; it will automatically purge in helm3
helm del <release-name> --namespace <namespace>
helm del $(helm ls --all | grep 'DELETED' | awk '{print $1}') --purge
helm3 del <release-name> --namespace <namespace>
# list and delete the release
helm3 del -n rook-ceph $(helm3 ls -n rook-ceph | grep 'rook-ceph' | awk '{print $1}')
More details: https://devopsqa.wordpress.com/2020/01/29/helm-cli-cheatsheet/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With