首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使用prometheus操作符部署prometheus?

如何使用prometheus操作符部署prometheus?
EN

Stack Overflow用户
提问于 2022-02-22 19:41:25
回答 1查看 318关注 0票数 0

我正在使用Prometheus操作符部署Prometheus。我使用了https://github.com/prometheus-operator/prometheus-operator的文档和头盔图表。由于我需要图表作为将来的参考,而不是直接安装存储库中的图表,所以我创建了一个Chart.yaml文件,并将存储库添加为依赖关系。

代码语言:javascript
复制
apiVersion: v2
description: kube-prometheus-stack collects Kubernetes manifests, Grafana dashboards, and Prometheus rules combined with documentation and scripts to provide easy to operate end-to-end Kubernetes cluster monitoring with Prometheus using the Prometheus Operator.
icon: https://raw.githubusercontent.com/prometheus/prometheus.github.io/master/assets/prometheus_logo-cb55bb5c346.png
engine: gotpl
type: application
maintainers:
  - name: 
    email: 
name: kube-prometheus-stack
sources:
  - https://github.com/prometheus-community/helm-charts
  - https://github.com/prometheus-operator/kube-prometheus
version: 32.2.1
appVersion: 0.54.0
kubeVersion: ">=1.16.0-0"
home: https://github.com/prometheus-operator/kube-prometheus
keywords:
- operator
- prometheus
- kube-prometheus
annotations:
  "artifacthub.io/operator": "true"
  "artifacthub.io/links": |
    - name: Chart Source
      url: https://github.com/prometheus-community/helm-charts
    - name: Upstream Project
      url: https://github.com/prometheus-operator/kube-prometheus
dependencies:
- name: kube-state-metrics
  version: "4.4.*"
  repository: https://prometheus-community.github.io/helm-charts
  condition: kubeStateMetrics.enabled
- name: prometheus-node-exporter
  version: "2.5.*"
  repository: https://prometheus-community.github.io/helm-charts
  condition: nodeExporter.enabled
- name: grafana
  version: "6.21.*"
  repository: https://grafana.github.io/helm-charts
  condition: grafana.enabled

Chart.yaml文件

然后执行以下cmds

代码语言:javascript
复制
hem dependency update 
helm install <chartname> .

每件事情都很好,但是当我检查吊舱时,只有操作符pod被创建,并与其他服务和grafana一起运行。这是Prometheus运算符的默认行为吗?

我认为这可能是Prometheus的默认行为,所以我尝试使用redis集群操作符部署redis集群,并使用rabitmq集群运算符部署rabitmq集群,但是每个集群只创建运算符pod,而不创建集群荚。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-02-23 07:15:08

运算符pod充当一个控制器,用于侦听有关特定自定义资源的事件。如果只部署运算符,则必须分别部署希望创建的自定义资源。

使用prometeus-操作符,这将是一种自定义的资源"prometheus“。如果您选择的舵图也能够部署这个(或不部署),则应该在图表values.yaml中指明,并在其github页面上记录。

您还可以使用prometheus -操作符repo中的示例来创建prometheus实例。请查看这些文件以完成以下操作:https://github.com/prometheus-operator/prometheus-operator/tree/main/example/rbac/prometheus

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71227364

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档