使用的命令:
git clone https://github.com/helm/charts.git
cd charts/stable/prometheus
helm install prometheus . --namespace monitoring --set rbac.create=true
运行第三个命令后,我收到以下错误:
任何人请帮我解决这个问题...
谢谢...
在 GitHub 页面,您可以看到此存储库已弃用:
所以我建议添加并使用 Prometheus Community Kubernetes Helm Charts 存储库:
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
然后您可以使用以下命令使用您的标志安装 Prometheus:
helm install prometheus prometheus-community/prometheus --namespace monitoring --set rbac.create=true
如果您确实想坚持使用旧存储库中的版本,则不必将存储库克隆到您的主机。只需按照存储库页面中的步骤操作。通过运行
https://charts.helm.sh/stable
确保您已将 helm repo list
存储库添加到 helm。如果没有,请使用命令添加:
helm repo add stable https://charts.helm.sh/stable
然后,您可以安装图表:
helm install prometheus stable/prometheus --namespace monitoring --set rbac.create=true
如果您不想安装状态指标您可以尝试
要在安装过程中禁用依赖项,请将
kubeStateMetrics.enabled
设置为 false 到 values.yaml 文件
在 values.yaml 文件行号。 435更改假
编辑完文件后,运行相同的命令。
helm install prometheus . --namespace monitoring --set rbac.create=true
参考文档:https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus#dependency
或
你可以尝试
尝试在
kube-state-metrics
文件夹(如果存在)中运行上述命令
还需要安装prometheus的依赖