ks8/openshift下安裝、卸載helm

環境

openshift 3.11(k8s環境請將oc命令替換成kubectl)

1. 安裝helm client端

  • 手工安裝,從官方後去下載包。https://github.com/helm/helm/releases
unzip helm.zip
chmod +x helm
mv helm /usr/local/bin
  • 自動安裝helm
 curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash

2. 創建serviceaccount並授權

export TILLER_NAMESPACE=kube-system  
oc create serviceaccount --namespace kube-system tiller

oc create clusterrolebinding tiller-cluster-rule --namespace kube-system  --clusterrole=cluster-admin --serviceaccount=kube-system:tiller

3. 安裝

執行init子命令,鏡像tag應該與client端保持一致

helm init  --service-account=tiller --tiller-namespace=kube-system  --tiller-image=registry.cn-hangzhou.aliyuncs.com/google_containers/tiller:v2.13.0 

檢查helm pod是否running

oc get po --namespace kube-system

4. 卸載

  • 卸載方式一:服務端卸載
oc delete deployment tiller-deploy --namespace kube-system
  • 卸載方式二:服務端、chart應用卸載
helm reset
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章