To be a better coder
分类: LINUX
2020-01-16 13:44:19
wget https://get.helm.sh/helm-v2.14.3-linux-amd64.tar.gz
tar xf helm-v2.14.3-linux-amd64.tar.gz
cd linux-amd64 #进入解压目录会看到两个可执行文件helm和tiller, 若采用容器化部署到kubernetes中,则可以不用管tiller,只需将helm复制到/usr/bin目录即可 cp helm /usr/bin/
echo "source <(helm completion bash)" >> /root/.bashrc # 命令自动补全
kubectl create serviceaccount --namespace=kube-system tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
helm init -i registry.cn-hangzhou.aliyuncs.com/google_containers/tiller:v2.14.3 --stable-repo-url --service-account tiller --override spec.selector.matchLabels.'name'='tiller',spec.selector.matchLabels.'app'='helm' --output yaml | sed 's@apiVersion: extensions/v1beta1@apiVersion: apps/v1@' | kubectl apply -f -
# 检查一下是不是安装成功了
kubectl get pods -n kube-system | grep tiller
root@rancherk8sm1:~# helm version
Client: &version.Version{SemVer:"v2.12.1", GitCommit:"02a47c7249b1fc6d8fd3b94e6b4babf9d818144e", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.12.1", GitCommit:"02a47c7249b1fc6d8fd3b94e6b4babf9d818144e", GitTreeState:"clean"}