背景简介
将开源 Helm 项目推送到私有仓库。
环境信息
- Helm v3.15.4 【Helm - 安装】
- Helm 私有仓库已部署(ChartMuseum) 【Helm - Docker 搭建 Helm 私有仓库 】
示例需求
- 将 Pega helm项目添加至私有仓库
详细步骤
第一步: 添加 Pega helm 仓库 【Helm - 添加仓库和查看仓库项目】
- 添加仓库
$ helm repo add pega https://pegasystems.github.io/pega-helm-charts
"pega" has been added to your repositories
- 查看仓库
$ helm repo list
NAME URL
pega https://pegasystems.github.io/pega-helm-charts
第二步: 查看 pega 仓库中的项目
$ helm search repo pega
NAME CHART VERSION APP VERSION DESCRIPTION
pega/pega 3.26.2 Pega installation on kubernetes
pega/addons 3.26.2 1.0 A Helm chart for Kubernetes
pega/backingservices 3.26.2 Helm Chart to provision the latest Search and R...
第三步: 下载对应项目 chart
- 下载
pega/pega
$ helm fetch pega/pega --version 3.26.2
- 查看下载的 chart 压缩包
$ ls -alh | grep 3.26
-rw-r--r-- 1 myserver myserver 148K Mar 26 15:27 pega-3.26.2.tgz
第四步: 安装 helm-push 插件
$ helm plugin install https://github.com/chartmuseum/helm-push
Downloading and installing helm-push v0.10.4 ...
https://github.com/chartmuseum/helm-push/releases/download/v0.10.4/helm-push_0.10.4_linux_amd64.tar.gz
Installed plugin: cm-push
第五步: 推送 chart 至私有仓库
$ helm cm-push pega-3.24.2.tgz http://localhost:8080
Pushing pega-3.26.2.tgz to http://localhost:8080...
Done.
第六步: 添加私有仓库和查看仓库项目 【Helm - 添加仓库和查看仓库项目】
- 添加私有仓库
$ helm repo add private-helm-repo http://192.168.122.254:30062
"private-helm-repo" has been added to your repositories
- 更新仓库
$ helm repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "private-helm-repo" chart repository
...Successfully got an update from the "pega" chart repository
Update Complete. ⎈Happy Helming!⎈
- 查看仓库项目
$ helm search repo private-helm-repo
NAME CHART VERSION APP VERSION DESCRIPTION
private-helm-repo/pega 3.26.2 Pega installation on kubernetes
以上便是本文的全部内容,感谢您的阅读,如遇到任何问题,欢迎在评论区留言讨论。