安装prometheus-operator在AWS EC2上不起作用,使产生“错误:无法下载” stable / prometheus-operator”

问题描述

我正在尝试安装

[ec2-user@ip-*********** ~]$ helm install stable/prometheus-operator --generate-name
Error: Failed to download "stable/prometheus-operator" (hint: running `helm repo update` may help)

而且安装监控程序也不起作用:

helm install monitoring --namespace monitoring stable/prometheus-operator

产生:

[ec2-user@ip-&&&&&&&&&&& ~]$ helm install monitoring --namespace monitoring
Error: must either provide a name or specify --generate-name

[ec2-user@ip-&&&&&&&&&&& ~]$ helm install monitoring --namespace monitoring --generate-name
Error: Failed to download "monitoring" (hint: running `helm repo update` may help)

有什么办法解决这个问题吗?

解决方法

您需要先添加存储库,然后更新/最新的kube-prometheus-stack(prometheus-operator)

helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add stable https://kubernetes-charts.storage.googleapis.com/
helm repo update
helm -n monitoring install [RELEASE_NAME] prometheus-community/kube-prometheus-stack

参考:

,

我最近安装了 prometheus(2021 年 5 月),似乎他们再次更改了语法。正确的命令如下,所以我想如果你现在想安装它可能会有所帮助:

helm repo add stable https://charts.helm.sh/stable
helm repo update
helm install [pod name] prometheus-community/kube-prometheus-stack
,

您稍微缺少语法:try

helm install --name prometheus --namespace monitoring stable/prometheus-operator

这里--name表示头盔部署的名称,stable/prometheus-operator是要使用的头盔图表。

,

我昨天刚刚安装了 prometheus,他们似乎再次更改了语法。我花了一个小时来研究正确的命令,所以我认为如果您想立即安装它可能会有所帮助 - 2021 年:

helm repo add stable https://charts.helm.sh/stabled
helm repo update
helm install [pod name] stable/prometheus
,

通过头盔安装普罗米修斯

  1. helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
  2. helm repo 添加 kube-state-metrics https://kubernetes.github.io/kube-state-metrics
  3. 掌舵回购更新
  4. 掌舵安装 [RELEASE_NAME]/ANY-NAME-GIVE prometheus-community/prometheus

下面的例子 图表名称:- prometheus-community/prometheus 版本名称:- 监控