不知道什么原因赁项,安裝了最新版的helm
,然后安裝drone
的時(shí)候局齿,就是報(bào)找不到資源的錯(cuò)誤,可明明都helm repo update
了N遍橄登,沒(méi)辦法抓歼,最后只能選擇下載官方代碼,然后本地打包來(lái)進(jìn)行local
式安裝了拢锹。附上本地helm
版本:
[root@master stable]# helm version
Client: &version.Version{SemVer:"v2.9.1", GitCommit:"20adb27c7c5868466912eebdf6664e7390ebe710", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.9.1", GitCommit:"20adb27c7c5868466912eebdf6664e7390ebe710", GitTreeState:"clean"}
廢話不多說(shuō)谣妻,步驟如下:
- 下載官方代碼
git clone https://github.com/helm/charts
- 進(jìn)入
stabel
目錄
cd charts/stable
- 打包
chart
helm package drone --debug
得到如下的輸出:
Successfully packaged chart and saved it to: /root/charts/stable/drone-2.0.0-rc.13.tgz
[debug] Successfully saved /root/charts/stable/drone-2.0.0-rc.13.tgz to /root/.helm/repository/local
這一步會(huì)生成類(lèi)似drone-2.0.0-rc.13.tgz
的包,該壓縮包被放到了當(dāng)前目錄下卒稳,并同時(shí)被保存到了helm的本地缺省倉(cāng)庫(kù)目錄中蹋半,默認(rèn)路徑在/root/.helm/repository/local/
(下面會(huì)用到)
- 嘗試安裝
[root@master stable]# helm search drone
NAME CHART VERSION APP VERSION DESCRIPTION
local/drone 2.0.0-rc.13 1.0.0-rc.5 Drone is a Continuous Delivery system built on ...
這個(gè)時(shí)候search
已經(jīng)能搜到了,當(dāng)然充坑,前提肯定是你有本地的helm
倉(cāng)庫(kù)减江,可以通過(guò)如下命令查看:
[root@master stable]# helm repo list
NAME URL
local http://127.0.0.1:8879/charts
stable https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
monocular https://helm.github.io/monocular
但是如果你此時(shí)直接helm install drone
,還是會(huì)報(bào)錯(cuò)
[root@master stable]# helm install local/drone --name drone
Error: failed to download "local/drone" (hint: running `helm repo update` may help)
因?yàn)槟J(rèn)會(huì)去stable
倉(cāng)庫(kù)找捻爷,這個(gè)時(shí)候就需要update
默認(rèn)倉(cāng)庫(kù)
- 替換
helm
默認(rèn)倉(cāng)庫(kù)
helm repo index --url=http://127.0.0.1:8879 /root/.helm/repository/local/
后面一個(gè)參數(shù)是要替換的倉(cāng)庫(kù)的charts
存放目錄辈灼,上面已經(jīng)介紹過(guò)
- 大功告成,安裝
helm install drone --name drone