Helm版本:
v3.2.4
Harbor版本
v1.10.3
1、首先启用 harbor 的 chart repository 服务
docker-compose down
./install.sh --with-chartmuseum
UI界面创建一个名为 chart_repo 的仓库
2、添加 harbor helm 仓库
helm repo add myrepo http://192.168.1.40/chartrepo/chart_repo --username=admin --password=xxxx
helm repo list
查看添加的repo源
3、安装 helm push 插件
# 在线安装(安装前先配置github的域名解析,加速下载。)
helm plugin install https://github.com/chartmuseum/helm-push
# 离线安装
## 地址:https://download.csdn.net/download/qq_39680564/12596897
cd /root/.local/share/helm/plugins
wget https://github.com/chartmuseum/helm-push/releases/download/v0.8.1/helm-push_0.8.1_darwin_amd64.tar.gz
tar -zxvf helm-push_0.8.1_darwin_amd64.tar.gz
4、上传chart
# 用法
$ helm push mychart-0.1.0.tgz chartmuseum # push .tgz from "helm package"
$ helm push . chartmuseum # package and push chart directory
$ helm push . --version="7c4d121" chartmuseum # override version in Chart.yaml
$ helm push . https://my.chart.repo.com # push directly to chart repo URL
5、示例
上传
helm push k8sdemo/ myrepo --version 0.1.1
使用
helm repo update
helm search repo k8sdemo
helm install demo myrepo/k8sdemo --version 0.1.0