我只是想知道是否有人找到了一种声明性的方式来安装/配置 helm 图表作为集群启动的一部分,并且可以将其 checkin 源代码管理。使用 Kuberenetes,我已经非常习惯“一切皆代码”类型的工作流,并且我意识到安装和配置 helm 主要基于通过 CLI 的命令式工作流。
我问的原因是因为目前我们的集群正在开发中,并将在生产中重新创建它。我们的大部分配置都是通过 deployment.yaml 文件以声明方式完成的。然而,我们花费了大量时间来安装和配置某些 helm 图表(例如 prometheus、grafana 等)
最佳答案
有像 helmfile 这样的工具或 helmsman这允许您声明安装 Helm 版本作为代码。
这是一个来自 helmfile.yaml
的例子:
releases:
# Published chart example
- name: promnorbacxubuntu # name of this release
namespace: prometheus # target namespace
chart: stable/prometheus # the chart being installed to create this release, referenced by `repository/chart` syntax
set: # values (--set)
- name: rbac.create
value: false
然后运行 helmfile charts
将确保安装所有列出的版本
关于kubernetes - 是否有一种声明性的方式在 kubernetes 集群中安装 helm 图表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55147536/