【问题标题】:Helm is not showing releases / Can't delete old releasesHelm 未显示版本/无法删除旧版本
【发布时间】:2020-02-11 14:57:45
【问题描述】:

我在 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 的旧版本?

谢谢。

【问题讨论】:

  • 试试helm list --allhelm list --deleted
  • 执行helm delete rook-ceph-acme --purge 应该适合你

标签: kubernetes-helm


【解决方案1】:

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

helm2

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

helm3

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/

【讨论】:

    猜你喜欢
    • 2018-01-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多