helm常用命令记录
常用命令
helm version // 查看helm版本
helm create xxx // 创建一个xxx charts
helm lint ./xxx // 检查包的格式或信息是否有问题
helm install xxx1 ./xxx // 部署安装xxx,设置名称为xxx1
helm list // 列出已经部署的charts
helm history // 发布历史
helm upgrade // 更新版本
helm rollback // 回滚版本
helm package ./xxx // 打包charts
helm repo add --username admin --password password myharbor xxx // 增加repo
helm uninstall xxx1 // 卸载删除xxx1
helm pull // 拉取chart包
helm cm-push // 推送chart包
helm repo update // 更新仓库资源
helm search hub // 从 Artifact Hub 中查找并列出 helm charts。Artifact Hub中存放了大量不同的仓库
helm search repo // 从你添加(使用 helm repo add)到本地 helm 客户端中的仓库中进行查找。该命令基于本地数据进行搜索,无需连接互联网
仓库相关
添加仓库
helm repo add bitnami https://charts.bitnami.com/bitnami
查看现有仓库
helm repo list
![在这里插入图片描述](https://img-blog.csdnimg.cn/direct/7e6dc3b985a54ceb9015b74d0d056b55.png)
删除仓库
helm repo remove bitnami
搜索chart包
helm search repo
helm search repo [repo-name]
![在这里插入图片描述](https://img-blog.csdnimg.cn/direct/42e55a396d5640689c517a68425f554a.png)
查看chart描述信息
helm show chart [chart-name]
![在这里插入图片描述](https://img-blog.csdnimg.cn/direct/efadcc1791424e55b5925b426e402ea9.png)
下载chart
helm pull bitnami/mariadb
创建chart
helm create compass-mysql
检查chart格式
helm lint ./compass-mysql
生成模版预览
helm template test ./compass-mysql --debug
helm template test ./compass-mysql -f ./charts/override.yaml
推送chart
helm cm-push --insecure --username [username] --password [password] --version=[version] [chart-path] [repo-name]
安装/升级应用
helm upgrade [name] [chart] --install --namespace [namespace] -f ./charts/override.yaml