The Helm charts commonly use the
endpoints role for Kubernetes SD. Because endpoints enumerates IP:port pairs for Services, Pods, and Nodes, relabeling rules then narrow that large set to the exact targets you want to scrape.
- In the Prometheus web UI go to Status → Configuration to view the generated
prometheus.yml. - The important section is
scrape_configs— this is where SD and relabeling determine which endpoints Prometheus scrapes. - Helm-generated configs typically create many
scrape_configs(one per ServiceMonitor/PodMonitor, or per built-in component), each usingkubernetes_sd_configswithrole: endpoints.
kubernetes_sd_configs with role: endpoints and relabel rules that keep only the Alertmanager Service and its web port:
- Kubernetes SD returns a broad set of endpoint entries. Prometheus relies on relabeling rules to include or exclude targets by matching metadata exposed by the SD.
- Common metadata keys you’ll see in relabeling rules:
__meta_kubernetes_service_name__meta_kubernetes_endpoint_port_name__meta_kubernetes_service_label_<label>__meta_kubernetes_endpoint_address_target_*(for pod/node backing info)
Example replacements that convert metadata into Prometheus target labels:
- Components such as the Kubernetes API server or kubelet require HTTPS and authentication.
- Even when using
kubernetes_sd_configsto locate endpoints, the correspondingscrape_configswill includescheme: https,tls_config, andauthorizationblocks so Prometheus can authenticate and validate TLS.
When scrape configs reference in-cluster secrets (for
credentials_file or ca_file), ensure Prometheus has appropriate RBAC access and the service account tokens/CA files are mounted at the expected paths. Misconfigured RBAC or missing files will result in scrape failures (DOWN targets).- Status → Configuration: review the generated
scrape_configsand relabel rules. - Status → Targets: inspect discovered endpoints,
UP/DOWNstates, labels, and latest scrape durations.

- Helm charts commonly use Kubernetes SD with
role: endpointsto discover nearly all cluster targets. - Relabel rules narrow the broad set of discovered endpoints to the exact targets you want to scrape (by service name, service labels, endpoint port name, etc.).
- Components that require TLS/auth include
tls_configandauthorizationsettings in their scrape configs. - Use Status → Configuration and Status → Targets to inspect generated configs and validate scrapes.
- Prometheus: Service discovery
- Kubernetes: Services, Endpoints and Pods
- Prometheus relabeling guide
- Helm charts (kube-prometheus-stack)