首页 > 解决方案 > 特定图表的 Helm 升级版本

问题描述

我是 Helm 的新手,我想更新我正在使用的图表版本。

当我运行时helm list,我可以看到:

NAME                REVISION    UPDATED                     STATUS      CHART                       APP VERSION NAMESPACE      
jenkins             43          Thu Sep 24 08:21:54 2020    DEPLOYED    jenkins-0.35.10             0.35.10     infrastructure 

我想将图表的版本更新为jenkins-0.35.1. 我查看了helm upgrade命令,但我并不清楚该怎么做。

有人可以帮忙吗?

我试过了helm upgrade --install --namespace infrastructure jenkins jenkins-0.35.1,但我可以看到这个错误Error: failed to download "jenkins-0.35.1" (hint: running helm repo update may help)

标签: kubernetes-helm

解决方案


在升级 helm 图表之前,需要使用 更新图表存储库helm repo update,这将更新您对图表存储库所做的更改。helm repo list将给出您已配置的存储库的列表。如果您没有任何 repo,这将有助于https://helm.sh/docs/topics/chart_repository/

但是,您可以通过运行命令手动打包较新版本helm package,然后升级图表。

$ helm ls --short # Here jenkins is my release name
jenkins

$ cd jenkins # into the chart directory

$ helm package . # You will now find a **jenkins-0.35.1.tgz** in the chart folder*

$ helm upgrade jenkins --namespace infrastructure jenkins-0.35.1.tgz

推荐阅读