Helm delete all releases

 ̄綄美尐妖づ 提交于 2019-11-29 16:24:48

问题


I'm trying find a way to delete all deployed releases in Helm.

It appears that Helm does not support deleting all releases, with --all or otherwise.

Would there be another way to delete all Helm releases in one command?


回答1:


To delete all Helm releases 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.

helm ls --all --short | xargs -L1 helm delete

Adding --purge will delete the charts as well, as per @Yeasin Ar Rahman's comment.

helm ls --all --short | xargs -L1 helm delete --purge




回答2:


This worked for me in a powershell cmd window:

helm del $(helm ls --all --short) --purge



回答3:


helm delete $(helm ls --short)

Description:

helm ls --short gives a list of releases ids.

helm delete id1 id2 id3 deletes realeses with ids: id1, id2, id3.

So combining them we get: helm delete $(helm ls --short)




回答4:


I regularly delete all releases in Helm too, so I thought it'd be useful to make a Helm plugin for it.

Install:

helm plugin install https://github.com/astronomerio/helm-delete-all-plugin --version 0.0.2


(You may be able to omit the --version x part on newer versions of Helm.)

Usage:

helm delete-all

https://github.com/astronomerio/helm-delete-all-plugin



来源:https://stackoverflow.com/questions/47817818/helm-delete-all-releases

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!