1 安装
官方文档: https://helm.sh/docs/intro/install/
建议参照官方文档安装,本文给出 linux 上的安装方式,其他平台请参见官方文档
1.1 通过 release 安装
1.从 github 上下载所需的版本 https://github.com/helm/helm/releases
2.解压 tar -zxvf helm-v3.0.0-linux-amd64.tar.gz
3.移动到指定位置 mv linux-amd64/helm /usr/local/bin/helm
(或者 sudo install helm /usr/local/bin/
)
1.2 通过官方脚本安装
这个链接不一定连的上
$ curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
$ chmod 700 get_helm.sh
$ ./get_helm.sh
1.3 通过 Snap 安装
sudo snap install helm --classic
1.4 查看安装
helm version
2 添加 repository
不建议使用阿里云,因为已经不更新,也不建议使用 offical,因为用的 google 链接需要翻墙。建议使用微软源,见下
$ helm repo add stable http://mirror.azure.cn/kubernetes/charts/
$ helm repo add incubator http://mirror.azure.cn/kubernetes/charts-incubator/
检查一下
$ helm repo update
$ helm search repo stable
关于这两个仓库,stable 是一些成熟的项目,incubator 是一些正在孵化中的项目
3 使用
请参考官方文档:https://helm.sh/docs/intro/using_helm/
helm install haproxy-ingress incubator/haproxy-ingress
其中,前面的 haproxy-ingress
是你部署 helm 包的名字,后面的是从仓库中拉取的包名,可以通过下面这行命令看到
$ helm list
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
haproxy-ingress default 1 2020-10-12 23:09:01.29333724 +0800 CST deployed haproxy-ingress-0.0.27 0.7.2
卸载,通过
$ helm uninstall haproxy-ingress