docs(etcd): clarify etcd metrics scraping with listen-metrics-urls (#13059)

This commit is contained in:
Cheprasov Daniil
2026-03-16 12:07:39 +03:00
committed by GitHub
parent 7acdc4df64
commit dbb8527560

View File

@@ -32,12 +32,12 @@ etcd_metrics_service_labels:
k8s-app: etcd k8s-app: etcd
app.kubernetes.io/managed-by: Kubespray app.kubernetes.io/managed-by: Kubespray
app: kube-prometheus-stack-kube-etcd app: kube-prometheus-stack-kube-etcd
release: prometheus-stack release: kube-prometheus-stack
``` ```
The last two labels in the above example allows to scrape the metrics from the The last two labels in the above example allows to scrape the metrics from the
[kube-prometheus-stack](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack) [kube-prometheus-stack](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack)
chart with the following Helm `values.yaml` : chart when it is installed with the release name `kube-prometheus-stack` and the following Helm `values.yaml`:
```yaml ```yaml
kubeEtcd: kubeEtcd:
@@ -45,8 +45,22 @@ kubeEtcd:
enabled: false enabled: false
``` ```
To fully override metrics exposition urls, define it in the inventory with: If your Helm release name is different, adjust the `release` label accordingly.
To fully override metrics exposition URLs, define it in the inventory with:
```yaml ```yaml
etcd_listen_metrics_urls: "http://0.0.0.0:2381" etcd_listen_metrics_urls: "http://0.0.0.0:2381"
``` ```
If you choose to expose metrics on specific node IPs (for example `10.141.4.22`, `10.141.4.23`, `10.141.4.24`) in `etcd_listen_metrics_urls`,
you can configure kube-prometheus-stack to scrape those endpoints directly with:
```yaml
kubeEtcd:
enabled: true
endpoints:
- 10.141.4.22
- 10.141.4.23
- 10.141.4.24
```