不知道什么原因,安装了最新版的helm
,然后安装drone
的时候,就是报找不到资源的错误,可明明都helm repo update
了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"}
废话不多说,步骤如下:
- 下载官方代码
git clone https://github.com/helm/charts
- 进入
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
这一步会生成类似drone-2.0.0-rc.13.tgz
的包,该压缩包被放到了当前目录下,并同时被保存到了helm的本地缺省仓库目录中,默认路径在/root/.helm/repository/local/
(下面会用到)
- 尝试安装
[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 ...
这个时候search
已经能搜到了,当然,前提肯定是你有本地的helm
仓库,可以通过如下命令查看:
[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
但是如果你此时直接helm install drone
,还是会报错
[root@master stable]# helm install local/drone --name drone
Error: failed to download "local/drone" (hint: running `helm repo update` may help)
因为默认会去stable
仓库找,这个时候就需要update
默认仓库
- 替换
helm
默认仓库
helm repo index --url=http://127.0.0.1:8879 /root/.helm/repository/local/
后面一个参数是要替换的仓库的charts
存放目录,上面已经介绍过
- 大功告成,安装
helm install drone --name drone
网友评论