请帮助我了解有关Prometheus
和Prometheus operator
集成到Kubernetes中的一件事。
从文档中我看到,使用了一种新的而非标准的Kubernetes对象来配置Prometheus operator
。我指的是标准的Pod
,Service
,ReplicaSet
,Deployment
等。如何创建像PrometheusRule
和Prometheus
这样的新词?这里有一个整合点吗?
将我带到这个问题的文档在这里https://github.com/coreos/prometheus-operator/blob/master/Documentation/user-guides/alerting.md
这种Kubernetes对象YAML的示例
apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
name: example
spec:
replicas: 2
alerting:
alertmanagers:
- namespace: default
name: alertmanager-example
port: web
serviceMonitorSelector:
matchLabels:
team: frontend
ruleSelector:
matchLabels:
role: alert-rules
prometheus: example