1. 程式人生 > >helm生產環境離線安裝

helm生產環境離線安裝

1.安裝helm

生產環境離線的情況下,使用tiller前端執行還是後端執行可以根據自己需求,如果希望tiller可以穩定的執行,可以嘗試docker跑以下,作者沒有嘗試不知是否會成功。但是不通過helm init的方式搭建,這個需要訪問網路。

1.1.安裝helm客戶端

各個版本的helm:https://github.com/helm/helm/releases

wget https://get.helm.sh/helm-v2.14.3-linux-amd64.tar.gz

tar -zxvf helm-v2.14.3-linux-amd64.tar.gz

mv linux-amd64/{helm,tiller} /usr/local/bin/

chmod +x /usr/local/bin/helm

helm version

1.2.安裝helm tiller(server)端

開啟一個shell:(可參考https://helm.sh/docs/using_helm/#running-tiller-locally)

[root@k8s1-master1 linux-amd64]# tiller 
[main] 2019/09/09 15:16:28 Starting Tiller v2.14.3 (tls=false)
[main] 2019/09/09 15:16:28 GRPC listening on :44134
[main] 2019/09/09 15:16:28 Probes listening on :44135
[main] 2019/09/09 15:16:28 Storage driver is ConfigMap
[main] 2019/09/09 15:16:28 Max history per release is 0
[storage] 2019/09/09 15:18:35 listing all releases with filter

開啟另一個shell:(當然也可以nohup tiller &讓程序後段執行,就不用另起shell了)

#地址為tiller IP
sed -i '$a\export HELM_HOST=localhost:44134' /etc/profile

#成功
[root@k8s1-master1 ~]# helm version
Client: &version.Version{SemVer:"v2.14.3", GitCommit:"0e7f3b6637f7af8fcfddb3d2941fcc7cbebb0085", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.14.3", GitCommit:"0e7f3b6637f7af8fcfddb3d2941fcc7cbebb0085", GitTreeState:"clean"}