我正在使用Prometheus操作符部署Prometheus。我使用了https://github.com/prometheus-operator/prometheus-operator的文档和头盔图表。由于我需要图表作为将来的参考,而不是直接安装存储库中的图表,所以我创建了一个Chart.yaml文件,并将存储库添加为依赖关系。
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.enabledChart.yaml文件
然后执行以下cmds
hem dependency update
helm install <chartname> .每件事情都很好,但是当我检查吊舱时,只有操作符pod被创建,并与其他服务和grafana一起运行。这是Prometheus运算符的默认行为吗?
我认为这可能是Prometheus的默认行为,所以我尝试使用redis集群操作符部署redis集群,并使用rabitmq集群运算符部署rabitmq集群,但是每个集群只创建运算符pod,而不创建集群荚。
发布于 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
https://stackoverflow.com/questions/71227364
复制相似问题