首页 > 解决方案 > Helm 未显示版本/无法删除旧版本

问题描述

我在 Kubernetes v1.15.3 上使用 helm v3.0.0-alpha.2。

[root@somebox log]# helm version
version.BuildInfo{Version:"v3.0.0-alpha.2", GitCommit:"97e7461e41455e58d89b4d7d192fed5352001d44", GitTreeState:"clean", GoVersion:"go1.12.7"}

helm list显示没有发布。

[root@somebox log]# helm list
NAME    NAMESPACE       REVISION        UPDATED STATUS  CHART

但是我无法安装新版本并为其命名,因为它“仍在使用”。它在某个时候是一个版本,但应该不再存在。

[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

如何清除未显示的旧版本helm list

谢谢。

标签: kubernetes-helm

解决方案


首先,您必须列出分配给它的命名空间的版本。其次,您必须清除helm2; 它会自动清除helm3

掌舵2

helm del <release-name> --namespace <namespace>
helm del $(helm ls --all | grep 'DELETED' | awk '{print $1}') --purge

掌舵3

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}')

更多详情:https ://devopsqa.wordpress.com/2020/01/29/helm-cli-cheatsheet/


推荐阅读