# INSTALLING THE HELM CLIENT
https://docs.helm.sh/using_helm/#installing-helm
helm是kubernetes的包安裝工具
helm是客戶端
tiller是服務端,運行在k8s內部
## From the Binary Releases
1. Download your desired version
2. Unpack it (tar -zxvf helm-v2.0.0-linux-amd64.tgz)
3. Find the helm binary in the unpacked directory, and move it to its desired destination (mv linux-amd64/helm /usr/local/bin/helm)
From there, you should be able to run the client: helm help.
init命令是安裝tiller服務端到k8s集群
由于網絡原因,-i 指定一個可以達到的鏡像, --stable-repo-url 配置阿里鏡像源
```bash
helm init --service-account tiller --upgrade -i womsgoogle/tiller:v2.11.0 --stable-repo-url https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
```
遇到錯誤 failed to list: configmaps is forbidden: User “system:serviceaccount:kube-system:default” cannot list configmaps in the namespace “kube-system”
執行以下命令創建 serviceaccount tiller 并且給它集群管理權限
```bash
kubectl create serviceaccount --namespace kube-system tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
helm version
```
Once Tiller is installed, running helm version should show you both the client and server version.
(If it shows only the client version, helm cannot yet connect to the server. Use kubectl to see if any tiller pods are running.)
Helm will look for Tiller in the kube-system namespace unless --tiller-namespace or TILLER_NAMESPACE is set.
參考:
https://blog.csdn.net/qq_35959573/article/details/80885052
https://blog.csdn.net/wenwenxiong/article/details/79067054