# 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