Cannot install kubernetes helm chart Error: cannot re-use a name that is still in use

Cannot install kubernetes helm chart Error: cannot re-use a name that is still in use

无法安装 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/cobra@v1.1.3/command.go:852
github.com/spf13/cobra.(*Command).ExecuteC
        github.com/spf13/cobra@v1.1.3/command.go:960
github.com/spf13/cobra.(*Command).Execute
        github.com/spf13/cobra@v1.1.3/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

使用升级代替安装:

helm upgrade -i myChart .

如果版本不存在,-i 标志安装版本。