💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
[TOC] ### **查找** ``` helm search repo chart ``` ### **上传与下载** ``` # 上传 curl -u "admin:Harbor12345" -X POST "http://192.168.89.3:8021/api/chartrepo/plugins/charts" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "chart=@logcenter-0.1.1.tgz;type=application/x-compressed" # 下载 helm pull stable/tomcat [--version 1.0.0] [--username xxx] [--password xxx] helm pull http://x.x.x.x/tomcat:1.0.0.tgz helm pull --repo http://x.x.x.x tomcat --version 1.0.0 ``` ### **安装** ``` helm install stable/tomcat --version=0.2.0 helm install ./tomcat-0.2.0.tgz helm install ./tomcat-0.2.0 helm install https://kubernetes-charts.storage.googleapis.com/tomcat-0.2.0.tgz helm install --repo https://kubernetes-charts.storage.googleapis.com nginx --version=x.x.x ``` ### **仓库** ``` helm repo list helm repo add name URL helm repo remove name helm repo update # like yum makecache helm repo index DIR # generate index.yaml ``` ##### **helm repo list** ``` $ helm repo list NAME URL stable https://kubernetes-charts.storage.googleapis.com local http://127.0.0.1:8879/charts ``` 可以看到stable这个repository对应的URL是 https://kubernetes-charts.storage.googleapis.com ,它其实就是google的repository。其实我们也可以在`~/.helm/repository/repositories.yaml`文件中找到相同的内容(其中~表示执行helm init时所使用的用户的主目录) ``` apiVersion: v1 generated: 2019-04-08T05:21:15.557206406-04:00 repositories: - caFile: "" cache: /root/.helm/repository/cache/stable-index.yaml certFile: "" keyFile: "" name: stable password: "" url: https://kubernetes-charts.storage.googleapis.com username: "" - caFile: "" cache: /root/.helm/repository/cache/local-index.yaml certFile: "" keyFile: "" name: local password: "" url: http://127.0.0.1:8879/charts username: "" ``` ### **Harbor操作** ``` helm repo add harbor-library http://x.x.x.x/chartrepo/library [--username xxx] [--password xxx] helm pull harbor-library/tomcat [--version 1.0.0] [--username admin] [--password Harbor12345] curl -u "admin:Harbor12345" -X POST "http://192.168.89.3:8021/api/chartrepo/plugins/charts" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "chart=@logcenter-0.1.1.tgz;type=application/x-compressed" ```