在尝试部署 Prometheus 时遇到错误:在 Chart.yaml 中找到,但在图表/目录中丢失:kube-state-metrics

问题描述 投票:0回答:2

使用的命令:

git clone https://github.com/helm/charts.git

cd charts/stable/prometheus

helm install prometheus . --namespace monitoring --set rbac.create=true

运行第三个命令后,我收到以下错误:

enter image description here

任何人请帮我解决这个问题...

谢谢...

kubernetes prometheus kubernetes-helm grafana
2个回答
1
投票

GitHub 页面,您可以看到此存储库已弃用:

已弃用并移至 https://github.com/prometheus-community/helm-charts

所以我建议添加并使用 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

0
投票

如果您不想安装状态指标您可以尝试

要在安装过程中禁用依赖项,请将

kubeStateMetrics.enabled
设置为 falsevalues.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

你可以尝试

  1. git 克隆 https://github.com/helm/charts.git
  2. cd 图表/稳定/普罗米修斯
  3. helm 依赖项更新

尝试在

kube-state-metrics
文件夹(如果存在)中运行上述命令

  1. helm 安装普罗米修斯。 --命名空间监控 --set rbac.create=true

还需要安装prometheus的依赖

了解更多信息:https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-prometheus-stack/README.md#dependency

© www.soinside.com 2019 - 2024. All rights reserved.