helm push文件到ChartMuseum

helm默认是不带push功能的,因此无法直接将本地的chart文件直接上传到ChartMuseum中。

1 安装插件

$ helm plugin install https://github.com/chartmuseum/helm-push
Downloading and installing helm-push v0.10.1 ...
https://github.com/chartmuseum/helm-push/releases/download/v0.10.1/helm-push_0.10.1_darwin_amd64.tar.gz
Installed plugin: cm-push

2 使用

先添加对应的ChartMuseum地址,

$ helm repo add chartmuseum http://your-cm-repo:8080

然后可以针对你需要push的文件,或者目录,甚至完整的tgz包,进行上传,

$ helm cm-push mychart-0.3.2.tgz chartmuseum
Pushing mychart-0.3.2.tgz to chartmuseum...
Done.

如果CM开启了验证,需要指定用户名和密码,

$ helm cm-push mychart-0.3.2.tgz chartmuseum -u username -p password
Pushing mychart-0.3.2.tgz to chartmuseum...
Done.

更多参数可以使用help命令查看,

$ helm cm-push --help
Helm plugin to push chart package to ChartMuseum

Examples:

  $ helm cm-push mychart-0.1.0.tgz chartmuseum       # push .tgz from "helm package"
  $ helm cm-push . chartmuseum                       # package and push chart directory
  $ helm cm-push . --version="1.2.3" chartmuseum     # override version in Chart.yaml
  $ helm cm-push . https://my.chart.repo.com         # push directly to chart repo URL
...

参考文档:

  1. https://github.com/chartmuseum/helm-push

你可能感兴趣的:(Kubernetes,helm,push,cm-push,ChartMuseum)