无法安装 kubernetes helm Chart 错误:无法重新使用仍在使用的名称

问题描述 投票:0回答:5

无法安装 helm 图表,但当我使用 helm 生成的原始文件时,我可以通过 kubectl apply 安装。

使用时出现以下错误

helm install myChart . --debug

Error: cannot re-use a name that is still in use
helm.go:88: [debug] cannot re-use a name that is still in use
helm.sh/helm/v3/pkg/action.(*Install).availableName
        helm.sh/helm/v3/pkg/action/install.go:442
helm.sh/helm/v3/pkg/action.(*Install).Run
        helm.sh/helm/v3/pkg/action/install.go:185
main.runInstall
        helm.sh/helm/v3/cmd/helm/install.go:242
main.newInstallCmd.func2
        helm.sh/helm/v3/cmd/helm/install.go:120
github.com/spf13/cobra.(*Command).execute
        github.com/spf13/[email protected]/command.go:852
github.com/spf13/cobra.(*Command).ExecuteC
        github.com/spf13/[email protected]/command.go:960
github.com/spf13/cobra.(*Command).Execute
        github.com/spf13/[email protected]/command.go:897
main.main
        helm.sh/helm/v3/cmd/helm/helm.go:87
runtime.main
        runtime/proc.go:225
runtime.goexit
        runtime/asm_amd64.s:1371

使用以下命令安装由 helm 生成的原始文件效果很好,但是当我运行

helm install myChart .
时,它给出了上述错误

helm install myChart . --dry-run > myChart.yaml
kubectl apply -f myChart.yaml
kubernetes devops kubernetes-helm kubectl helm3
5个回答
45
投票

使用升级而不是安装:

helm upgrade -i myChart .

如果该版本不存在,则使用

-i
标志安装该版本。


9
投票

另一种选择可能是:

  1. 列出可用的舵图:
    helm list
    。例如。:
  2. 删除所需的舵图
    helm delete phoenix-chart
    。例如。:

4
投票

删除

sh.helm.release.v1.<chart>.v1
kubesecret 并重试是我必须做的。

我用

寻找影响深远的秘密

kubectl get secrets -n <chart-namespace>

kubectl get secrets --all-namespaces


0
投票

对我有用 - helm uninstall /


0
投票

就我而言,helm 卸载没有正确发生

host1:~ # helm uninstall longhorn -n longhorn-system
Error: 1 error occurred:
        * job failed: BackoffLimitExceeded


host1:~ #

掌舵列表已被删除,

host1:~ # helm list -A
NAME                                    NAMESPACE       REVISION        UPDATED                                 STATUS          CHART                                           APP VERSION
host1:~ #   

尚未删除的 pod 列表,并看到卸载卡在错误处,

host1:~ # kubectl get pods -n longhorn-system
NAME                                                READY   STATUS    RESTARTS   AGE
csi-attacher-785fd6545b-8qjqv                       1/1     Running   0          14h
csi-attacher-785fd6545b-h7wmq                       1/1     Running   0          14h
csi-attacher-785fd6545b-lr625                       1/1     Running   0          14h
csi-provisioner-8658f9bd9c-27mmk                    1/1     Running   0          14h
csi-provisioner-8658f9bd9c-4sgvn                    1/1     Running   0          14h
csi-provisioner-8658f9bd9c-m8xgt                    1/1     Running   0          14h
csi-resizer-68c4c75bf5-4sd4t                        1/1     Running   0          14h
csi-resizer-68c4c75bf5-f4lqc                        1/1     Running   0          14h
csi-resizer-68c4c75bf5-lcl6l                        1/1     Running   0          14h
csi-snapshotter-7c466dd68f-26w6t                    1/1     Running   0          14h
csi-snapshotter-7c466dd68f-gzcht                    1/1     Running   0          14h
csi-snapshotter-7c466dd68f-n6jcv                    1/1     Running   0          14h
engine-image-ei-74783864-jbldp                      1/1     Running   0          14h
instance-manager-b00a9cfc3d9c0134d4764fb2c3664f0b   1/1     Running   0          14h
longhorn-csi-plugin-6zxg5                           3/3     Running   0          14h
longhorn-driver-deployer-8657b87cf9-b77rw           1/1     Running   0          14h
longhorn-manager-pxnwm                              1/1     Running   0          14h
longhorn-ui-74966dd455-98gp7                        1/1     Running   0          14h
longhorn-ui-74966dd455-c6m62                        1/1     Running   0          14h
longhorn-uninstall-9drls                            0/1     Error     0          6m12s
longhorn-uninstall-vnf79                            0/1     Error     0          6m6s
host1:~ #

通过删除 longhorn 命名空间本身来解决,

host1:~ # kubectl delete ns longhorn-system
namespace "longhorn-system" deleted
host1:~ #
© www.soinside.com 2019 - 2024. All rights reserved.