harbor管理helm-charts
版本信息
harbor version: 1.8.1
helm version: v3.6.2
docker version: 18.06.3
docker-compose version: 1.25.4
安装chartmuseum插件
harbor 安装的时候 默认没有helm charts的仓库
docker-compose stop
./install.sh --with-chartmuseum
安装完成之后登录页面上就会有了 helm charts 了,页面上也可以直接上传charts
helm 安装push插件
# 安装插件
helm plugin install https://github.com/chartmuseum/helm-push
# 查看
[root@k8s-master ~]# helm plugin list
NAME VERSION DESCRIPTION
cm-push 0.10.1 Push chart package to ChartMuseum
创建一个charts项目
添加仓库
helm repo add harbor https://harbor.xxx.com/chartrepo/library
# 如需要配置用户名密码
helm repo add harbor --username=xxx --password=xxx https://harbor.xxx.com/chartrepo/library
查看
[root@k8s-master ~]# helm repo list
NAME URL
bitnami https://charts.bitnami.com/bitnami
ingress-nginx https://kubernetes.github.io/ingress-nginx
harbor http://harbor.aimm.cn/chartrepo/library
上传到仓库
# 查找charts
[root@k8s-master ~]# helm search repo redis
NAME CHART VERSION APP VERSION DESCRIPTION
bitnami/redis 15.0.4 6.2.5 Open source, advanced key-value store. It is of...
bitnami/redis-cluster 6.3.6 6.2.5 Open source, advanced key-value store. It is of...
# 下载到本地
[root@k8s-master ~]# helm pull bitnami/redis
[root@k8s-master ~]# ls redis-15.0.4.tgz
redis-15.0.4.tgz
# 上传到私有仓库
[root@k8s-master ~]# helm cm-push --username=admin --password=Harbor12345 redis-15.0.4.tgz harbor
Pushing redis-15.0.4.tgz to harbor...
Done.
上传完成后到harbor仓库查看
强制推送
[root@k8s-master ~]# helm cm-push --force redis-15.0.4.tgz harbor
Pushing redis-15.0.4.tgz to harbor...
Done.
直接推送到URL
[root@k8s-master ~]# helm cm-push redis-15.0.4.tgz https://harbor.xxx.com/chartrepo/library
Pushing redis-15.0.4.tgz to https://harbor.xxx.com/chartrepo/library
Done.
报错解决:
[root@k8s-master ~]# helm cm-push redis-15.0.4.tgz harbor
Pushing redis-15.0.4.tgz to harbor...
Error: 401: could not properly parse response JSON: {"code":401,"message":"Unauthorized"}
......
Error: plugin "cm-push" exited with error
添加用户名密码即可。
-----------------------------------------要克服生活的焦虑和沮丧,得先学会做自己的主人-----------------------------------------
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 2025年我用 Compose 写了一个 Todo App
· 张高兴的大模型开发实战:(一)使用 Selenium 进行网页爬虫