使用 Nexus 作为 helm repo

1,416 阅读1分钟

使用 Nexus 作为 helm repo

创建仓库

在本地配置 helm3 客户端

打开仓库详情查看仓库地址

这里的地址是:https://repo.jlovec.net/repository/charts/

使用命令行 配置本地 repo

helm repo add nexus https://username:password@repo.jlovec.net/repository/charts/

这里的usernamepassword需要改成有 helm 仓库权限的用户及密码

查看配置是否成功

helm repo ls

image-20220507145456794

image-20220507145456794

安装上传工具

helm plugin install --version master https://gitee.com/mirrors_sonatype-nexus-community/helm-nexus-push.git

查看安装结果

helm plugin ls

测试上传本地 charts

创建本地 chart 用于本地测试

# 创建名称为 testapp 的 chart
helm create testapp

# 打包 testapp
helm package testapp

image-20220507150502867

上传打包好的 chart 到 nexus 仓库

helm nexus-push nexus testapp-0.1.0.tgz -u username -p password

查看上传结果