Technical note
Helm常用操作
参考文档
https://helm.sh/zh/docs/intro/install/
中心仓库
离线安装
https://github.com/helm/helm/releases
tar -zxvf helm-v3.11.3-linux-amd64.tar.gz
mv linux-amd64/helm /usr/local/bin/helm
常用操作
# 添加私有仓库
helm repo add bitnami https://charts.bitnami.com/bitnami
helm update
# 查看仓库列表
helm repo list
# 在ArtifactHub中查找
helm search hub wordpress
# 查找所有版本号
helm search repo bitnami/redis --versions --devel
# 添加三方仓库并查找
helm repo add brigade https://brigadecore.github.io/charts
helm search repo brigade
# 安装
## 在线安装
helm install happy-panda bitnami/wordpress
## 本地安装,并指定命名空间
helm install redis ./redis --namespace redis --create-namespace
# 查看安装状态
helm status happy-panda
helm status redis --namespace redis
# 升级
helm upgrade -f panda.yaml happy-panda bitnami/wordpress
helm upgrade redis ./redis
# 回滚
helm status redis --namespace redis
# 卸载
helm uninstall redis --namespace redis
3.8以下通过cm-push插件推送
# 安装cm-push插件,3.8以上虽然自带push命令,但无法实现向http仓库推送
helm plugin install https://github.com/chartmuseum/helm-push
# 添加HarborHelm仓库
helm repo add dubhe http://harbor.dubhe:30002/chartrepo/dubhe
helm repo update
# 上传chart
helm cm-push ./gogs.tgz dubhe --username admin --password yourpass
3.8以上支持OCI规范直接推送
https://helm.sh/zh/docs/helm/helm_push/ https://helm.sh/zh/docs/topics/registries/ https://github.com/helm/helm/pull/11599 https://github.com/helm/helm/issues/11683 https://github.com/helm/helm/issues/6324
helm registry login -u admin harbor.dubhe:30002 --insecure
helm push dubhe-register.tgz oci://harbor.dubhe:30003/dubhe-chart # 此方式不支持http