helm相关
部署
https://helm.sh/zh/docs/helm/helm_install/
helm install polaris-controller .
更新
helm upgrade -i polaris-controller .
查看部署列表
helm list
卸载
helm uninstall polaris-controller
分析
https://helm.sh/zh/docs/helm/helm_status/
helm status polaris-controller --show-desc --show-resources
调试
验证语法
helm lint
生成yaml
helm install --generate-name --dry-run --debug . > dry-run-debug.tmp.yaml
- 在本地测试渲染chart模板
helm template --debug . > template-debug.tmp.yaml
- 清理yaml
rm *.tmp.yaml
create namespace踩坑记录
helm3 创建命名空间的方式需要在命令中显式声明,在templates文件夹中创建命名空间会报错
-
如何复现:当在templates文件夹中存在k8s命名空间创建文件时,会报如下错误
Error: INSTALLATION FAILED: Unable to continue with install: Namespace "test" in namespace "" exists and cannot be imported into the current release
- 解决方案:创建命名空间的方式需要在命令中显式声明,templates文件夹中去掉命名空间创建相关内容
helm install --create-namespace --namespace {k8s_namespace_name} --generate-name
这样就不会报错了

浙公网安备 33010602011771号