首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >大使helm图表升级失败,因为资源已存在于群集中,并且未在以前的版本错误中定义

大使helm图表升级失败,因为资源已存在于群集中,并且未在以前的版本错误中定义
EN

Stack Overflow用户
提问于 2020-01-06 14:23:02
回答 2查看 1.8K关注 0票数 0

更新大使头盔图表

helm upgrade --install --wait ambassador -f ambassador-helm-values.yaml stable/ambassador

失败,出现以下错误:

代码语言:javascript
复制
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并失败,并显示相同的错误消息。

EN

回答 2

Stack Overflow用户

发布于 2020-01-12 22:28:48

有没有尝试先通过kubectl安装具体的资源?为了生成yamls,您可以在调试模式下使用模拟运行。例如:

代码语言:javascript
复制
helm install . --dry-run --debug --generate-name

这将在您的屏幕上输出生成的资源。然后将上一版本中未定义的crd复制到一个单独的yaml文件(即customResourceDefinition.yaml)中,并使用kubectl手动安装:

代码语言:javascript
复制
kubectl apply -f ./customResourceDefinition.yaml

在此之后,您可以再次尝试helm upgrade命令。也许升级命令真的很严格,在采取任何行动之前,每个资源都必须存在。

这只是一种变通方法和猜测。我以前没有遇到过这个问题,也根本没有使用过helm upgrade。希望它能有所帮助:)

票数 0
EN

Stack Overflow用户

发布于 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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59607537

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档