https://www.cuiliangblog.cn/detail/article/45
thanos: 0.30.2 prometheus: 2.42.0 alertmanager: 0.25.0
blackbox-exporter: 0.23.0 elasticsearch-exporter: 1.5.0 kafka-exporter:1.4.2 mysqld-exporter:0.14.0 node-exporter: 1.5.0 process-exporter:0.7.10
containers:
- name: prometheus
image: harbor.com/prometheus/prometheus:v2.42.0
spec:
routes:
- match: Host(`prometheus.com`)
kind: Rule
services:
- name: prometheus-headless
port: 9090
修改各种exporter的资源地址,例如es地址,mysql地址,网络探针ip地址域名等
- --es.uri=https://elastic:[email protected]:31000
apply metrics-server.yaml 和 kube-state-metrics.yaml(注意k8s集群版本差异)
rbac.yaml——>thanos-storage-minio.yaml——>其他yaml 只需要在其中一个集群部署Alertmanager和thanos-query-global即可
修改bucket的access_key和secret_key还有地址
bucket: thanos-tj-test
endpoint: 192.168.10.20:40000
access_key: access_key
secret_key: secret_key
修改Prometheus额外标签,标注集群名称
- name: CLUSTER
value: "shanghai"
修改ingress资源访问域名
spec:
routes:
- match: Host(`prometheus.shanghai.com`)