Helm 简介
Helm把Kubernetes资源(比如deployments、services或 ingress等) 打包到一个chart中,而chart被保存到chart仓库。通过chart仓库可用来存储和分享chart。Helm使发布可配置,支持发布应用配置的版本管理,简化了Kubernetes部署应用的版本控制、打包、发布、删除、更新等操作。
做为Kubernetes的一个包管理工具,用来管理charts——预先配置好的安装包资源,有点类似于Ubuntu的APT和CentOS中的yum。Helm具有如下功能:
- 创建新的chart
- chart打包成tgz格式
- 上传chart到chart仓库或从仓库中下载chart
- 在Kubernetes集群中安装或卸载chart
- 管理用Helm安装的chart的发布周期
nexus 代理
nexus 企业级的私有资源镜像代理服务,nexus可以代理maven、pip、npm、yum、docker等资源镜像服务。默认官网提供的nexus没有Helm代理服务,也就是无法创建Helm代理仓库,但是有插件支持。插件的具体信息请参考nexus-repository-helm。
插件安装步骤
- 下载插件jar包
下载地址如下:nexus-repository-helm jar包地址,下载时请选择合适的版本,nexus与nexus-repository-helm插件版本对应关系请参照nexus-repository-helm版本说明。
- 复制jar包nexus工作目录
注意下面脚本<nexus_dir>代表nexus软件安装目录
<nexus_dir>/system/org/sonatype/nexus/plugins/nexus-repository-helm/0.0.2/nexus-repository-helm-0.0.2.jar
- 配置插件扩展xml
nexus的插件加载配置xml文件所在目录,同样的<nexus_dir>代表nexus软件安装目录
<nexus_dir>/system/org/sonatype/nexus/assemblies/nexus-core-feature/3.13.0-01/nexus-core-feature-3.13.0-01-features.xml
修改内容如下,意思就是追加了一个nexus-repository-helm插件,注意插件的版本信息。
<feature version="0.0.2" prerequisite="false" dependency="false">nexus-repository-helm</feature>
<feature name="nexus-repository-helm" description="org.sonatype.nexus.plugins:nexus-repository-helm" version="0.0.2">
<details>org.sonatype.nexus.plugins:nexus-repository-helm</details>
<bundle>mvn:org.sonatype.nexus.plugins/nexus-repository-helm/0.0.2</bundle>
</feature>
- 重启nexus服务即可
重启服务后就能看到创建的代理仓库类型有helm类型了。
最后
其实最后你会发现,最新版本的nexus已经默认支持helm代理了。哎,又白白折腾了,不过好歹算是明白了nexus的插件机制了吧。