Helm upgrade 时 no matches for kind “xxxx“ in version “xxxx“ 问题处理

1. 问题

kubernetes 升过级,但是 helm release 旧版本中有新版本 api 弃用的 version。
在 helm upgrade 时就出现类似如下版本不匹配的错误,导致 helm upgrade 失败。
当然 helm uninstall 再重新安装可能可以跳过这个问题(只要 charts 不再使用弃用的 api),但是 helm release 的历史记录就丢失了,处理方式显得有点暴力。

no matches for kind "HorizontalPodAutoscaler" in version "autoscaling/v2beta1"

2. 解决

通过搜索 helm github issue,发现有个 helm 插件可以解决:
https://github.com/helm/helm-mapkubeapis

插件安装、使用很简单:

helm plugin install https://github.com/helm/helm-mapkubeapis
# 如处理以下 cbf helm release
helm mapkubeapis cbf -n uat

然后就可以愉快地 helm upgrade 了。

插件使用

参考资料:
[1] https://github.com/helm/helm-mapkubeapis

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

ygqygq2

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值