參考:https://docs.helm.sh/using_helm/#installing-helmnode
須要鏡像nginx
gcr.io/kubernetes-helm/tiller:v2.7.0
重命名一個taggit
docker pull xsllqs/kubernetes-helm:v2.7.0 docker tag xsllqs/kubernetes-helm:v2.7.0 gcr.io/kubernetes-helm/tiller:v2.7.0
上傳到私有倉庫github
docker tag xsllqs/kubernetes-helm:v2.7.0 172.19.2.139/xsllqs/kubernetes-helm/tiller:v2.7.0 docker push 172.19.2.139/xsllqs/kubernetes-helm/tiller:v2.7.0
每一個node都下載並重命名該節點web
docker pull 172.19.2.139/xsllqs/kubernetes-helm/tiller:v2.7.0 docker tag 172.19.2.139/xsllqs/kubernetes-helm/tiller:v2.7.0 gcr.io/kubernetes-helm/tiller:v2.7.0
修改環境變量redis
vim /etc/bashrc export PATH="$PATH:/usr/local/bin" vim /etc/profile export PATH="$PATH:/usr/local/bin" source /etc/profile
RBAC受權docker
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"}}}}'
部署vim
cd /opt/helm curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > get_helm.sh chmod 700 get_helm.sh ./get_helm.sh helm init --tiller-namespace=kube-system
查看tiller是否安裝成功api
kubectl get pods --namespace kube-system
測試Client和Server是否鏈接正常bash
helm version
卸載
kubectl delete deployment tiller-deploy --namespace kube-system
web-UI安裝(本人未部署)
helm install stable/nginx-ingress helm install stable/nginx-ingress --set controller.hostNetwork=true helm repo add monocular https://kubernetes-helm.github.io/monocular helm install monocular/monocular
添加國內可用倉庫
helm repo add opsgoodness http://charts.opsgoodness.com
安裝redis應用
helm install stable/redis-ha --version 0.2.3
若是上面執行不了就直接執行如下內容
helm install https://kubernetes-charts.storage.googleapis.com/redis-ha-0.2.3.tgz
訪問redis
redis-cli -h torrid-tuatara-redis-ha.default.svc.cluster.local
安裝kafka應用
helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com helm install incubator/kafka --version 0.2.1
或者
helm install https://kubernetes-charts-incubator.storage.googleapis.com/kafka-0.2.1.tgz
刪除部署的應用
helm ls helm delete {name}