更新大使头盔图表
helm upgrade --install --wait ambassador -f ambassador-helm-values.yaml stable/ambassador
失败,出现以下错误:
UPGRADE FAILED
Error: kind ClusterRoleBinding with the name "ambassador-crds" already exists in the cluster and wasn't defined in the previous release. Before upgrading, please either delete the resource from the cluster or remove it from the chart
Error: UPGRADE FAILED: kind ClusterRoleBinding with the name "ambassador-crds" already exists in the cluster and wasn't defined in the previous release. Before upgrading, please either delete the resource from the cluster or remove it from the chart已删除ClusterRoleBinding ambassador-crds并尝试运行helm upgrade命令。它再次生成ambassador-crds并失败,并显示相同的错误消息。
发布于 2020-01-12 22:28:48
有没有尝试先通过kubectl安装具体的资源?为了生成yamls,您可以在调试模式下使用模拟运行。例如:
helm install . --dry-run --debug --generate-name这将在您的屏幕上输出生成的资源。然后将上一版本中未定义的crd复制到一个单独的yaml文件(即customResourceDefinition.yaml)中,并使用kubectl手动安装:
kubectl apply -f ./customResourceDefinition.yaml在此之后,您可以再次尝试helm upgrade命令。也许升级命令真的很严格,在采取任何行动之前,每个资源都必须存在。
这只是一种变通方法和猜测。我以前没有遇到过这个问题,也根本没有使用过helm upgrade。希望它能有所帮助:)
发布于 2020-02-14 20:01:56
我使用的是helm版本的2.15.*。这似乎是helm (或Tiller)上的一个bug。选项--cleanun-on-fail似乎也不起作用。我用来删除正在抱怨的资源,并再次运行helm升级,但我发现必须重复执行此操作很烦人。对我来说起作用的是添加选项--atomic。如果提供,升级过程将在升级失败的情况下回滚所做的更改。
这似乎是Tiller(服务器端数据库)被损坏的问题。在github中查看讨论:https://github.com/helm/helm/issues/6031
https://stackoverflow.com/questions/59607537
复制相似问题