目录
Helm 版本 | 支持的 Kubernetes 版本 |
---|---|
3.9.x | 1.24.x - 1.21.x |
3.8.x | 1.23.x - 1.20.x |
3.7.x | 1.22.x - 1.19.x |
3.6.x | 1.21.x - 1.18.x |
3.5.x | 1.20.x - 1.17.x |
3.4.x | 1.19.x - 1.16.x |
3.3.x | 1.18.x - 1.15.x |
3.2.x | 1.18.x - 1.15.x |
3.1.x | 1.17.x - 1.14.x |
3.0.x | 1.16.x - 1.13.x |
2.16.x | 1.16.x - 1.15.x |
2.15.x | 1.15.x - 1.14.x |
2.14.x | 1.14.x - 1.13.x |
2.13.x | 1.13.x - 1.12.x |
2.12.x | 1.12.x - 1.11.x |
2.11.x | 1.11.x - 1.10.x |
2.10.x | 1.10.x - 1.9.x |
2.9.x | 1.10.x - 1.9.x |
2.8.x | 1.9.x - 1.8.x |
2.7.x | 1.8.x - 1.7.x |
2.6.x | 1.7.x - 1.6.x |
2.5.x | 1.6.x - 1.5.x |
2.4.x | 1.6.x - 1.5.x |
2.3.x | 1.5.x - 1.4.x |
2.2.x | 1.5.x - 1.4.x |
2.1.x | 1.5.x - 1.4.x |
2.0.x | 1.4.x - 1.3.x |
国内镜像下载地址:Index of helm-local
根据自己的版本需求来下载:
helm-v版本号-linux-amd64.tar.gz
下载完丢到服务器上即可:
tar -zxvf helm-v3.6.0-linux-amd64.tar.gz
cp -a linux-amd64/helm /usr/local/bin/
chmod a+x /usr/local/bin/helm
因为Helm3里面已经移除了tiller,所以安装到这里就搞定了,如果你安装的是helm2,那请继续往下:
创建 rbac-config.yaml 文件:
- apiVersion: v1
- kind: ServiceAccount
- metadata:
- name: tiller
- namespace: kube-system
- ---
- apiVersion: rbac.authorization.k8s.io/v1beta1
- kind: ClusterRoleBinding
- metadata:
- name: tiller
- roleRef:
- apiGroup: rbac.authorization.k8s.io
- kind: ClusterRole
- name: cluster-admin
- subjects:
- - kind: ServiceAccount
- name: tiller
- namespace: kube-system
kubectl create -f rbac-config.yaml
helm init --service-account tiller --skip-refresh
添加常用 chart 仓库:
- helm repo add bitnami https://charts.bitnami.com/bitnami
- helm repo add stable http://mirror.azure.cn/kubernetes/charts
- helm repo add aliyun https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
- helm repo add incubator https://charts.helm.sh/incubator
更新chart仓库:
- helm repo update
- helm repo list
删除 incubator 仓库:
helm repo remove incubator
查看配置的 chart 仓库有哪些:
helm repo list
从指定 chart 仓库地址搜索 chart:
helm search repo aliyun | grep 名称
安装 chart:
- #指定 release 的名字为 my-redis,-n 指定部署到 k8s 的 namespace
- helm install my-redis bitnami/redis [-n default]
- #不指定 release 的名字时,需使用 –generate-name 随机生成一个名字
- helm install bitnami/redis --generate-name
查看所有 release:
helm ls
查看指定的 release 状态:
helm status my-redis
删除指定的 release:
helm uninstall my-redis