desired version
1:Download your desired version
2:Unpack it (tar -zxvf helm-v2.10.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)
$ kubectl create serviceaccount --namespace kube-system tiller
$ kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
使用阿里云镜像安装并把默认仓库设置为阿里云上的镜像仓库
$ helm init --upgrade --tiller-image registry.cn-hangzhou.aliyuncs.com/google_containers/tiller:v2.9.1 --stable-repo-url https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
$ kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
$ helm init --upgrade --tiller-image registry.cn-hangzhou.aliyuncs.com/google_containers/tiller:v2.11.0 --stable-repo-url https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
$ helm lint 和 $ helm install --dry-run --debug <chart_dir>
$ helm lint 会检测 chart 的语法,报告错误以及给出建议。
$ helm install -n <name> -f <yaml> <chart_dir> --namespace <namespace> --set <value>
$ helm upgrade <name> -f <yaml> --set <value>
$ helm delete --purge <release_name>
$ helm rollback --debug mysql <version_number>
为了方便helm命令的使用,helm提供了自动补全功能,如果使用zsh请执行:
$ source <(helm completion zsh)
如果使用bash请执行:
$ source <(helm completion bash)