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
这样就不会报错了
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?