harbor helm 仓库使用

时间:2022-09-16 21:44:10

harbor 已经支持helm 私服仓库了,还是比较方便的

安装

  • 下载在线安装包
wget https://storage.googleapis.com/harbor-releases/release-1.6.0/harbor-online-installer-v1.6.0.tgz
  • 配置harbor

    harbor.cfg 文件

目前主要配置hostname  使用自己服务器的ip即可
  • 生成docker-compose file
sudo ./install.sh   --with-clair --with-chartmuseum

使用

  • 登陆
默认密码 admin/Harbor12345

harbor helm 仓库使用
harbor helm 仓库使用

说明

可以使用的helm 上传插件 helm-push

  • 安装helm
curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
  • 安装push 插件
helm init 
helm plugin install https://github.com/chartmuseum/helm-push
  • 添加repo

   helm repo add --username=admin --password=Passw0rd myrepo https://xx.xx.xx.xx/chartrepo
   or 添加特定仓库
   helm repo add --username=admin --password=Passw0rd myrepo https://xx.xx.xx.xx/chartrepo/myproject

helm repo list
NAME URL
stable  https://kubernetes-charts.storage.googleapis.com
local http://127.0.0.1:8879/charts
myrepo  http://ipaddress/chartrepo/library
  • 创建demo
helm create app
  • push
helm push --username=admin --password=Harbor12345 app myrepo
  • 查看信息
    harbor helm 仓库使用
    harbor helm 仓库使用

说明

monocular 是一个不错的UI选择,同时支持使用helm 进行安装

参考资料

https://github.com/goharbor/harbor/blob/master/docs/installation_guide.md
https://github.com/goharbor/harbor/blob/master/docs/user_guide.md#manage-helm-charts
https://docs.helm.sh/using_helm/#installing-helm
https://github.com/helm/chartmuseum
https://github.com/helm/charts