「HELM」- 常见错误整理

支持多种模板

helm create 创建的 Chart 其内容是“固定”的,该 chart 功能并不丰富。

“helm crearte” command for bitnami charts/common Library? : r/kubernetes
charts/template at main · bitnami/charts

#1 no repositories found

How do I enable the Incubator repository?

环境信息

系统环境:CentOS Linux release 7.5.1804 (Core)
软件版本:Helm v3.0.0-beta.3

问题描述
执行helm repo update命令,产生Error: no repositories found. You must add one before updating错误。

问题原因
在下载并安装 helm 二进制程序之后,默认是没有任何配置文件的,因此也不存在仓库配置信息。

解决办法
官方的 Helm 的 Git 仓库为「GitHub/helm/charts」,该仓库用于提交 Charts 包,而包在`https://kubernetes-charts.storage.googleapis.com/’%E4%BB%93%E5%BA%93%E4%B8%AD%E3%80%82

手动添加仓库:

helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com/
helm repo add stable https://kubernetes-charts.storage.googleapis.com # 稳定版仓库

helm repo update # 从 Chart 仓库中,更新本地可用的 Chart 信息。

# helm search repo <chart-name>
helm search repo haproxy

[Sol]… another operation (install/upgrade/rollback) is in progress

kubernetes – UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress – Stack Overflow

问题描述

# helm upgrade ...
Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress

原因分析

1)或,某个更新过程比较慢,稍等即可;
2)或,异常导致没有部署成功;

解决办法

如果是升级失败,则进行回滚即可:

helm ls --namespace <namespace>
helm history <release> --namespace <namespace>
helm rollback <release> <revision> --namespace <namespace>

[Sol] release: not found

当执行 helm 命令时,我们未指定 Namespace 参数,所以无法查看已部署的服务。