Skip to content

Clarify how kubernetes_sd_configs works for scraping pods, replicasets, etc. #836

Open
@wstrange

Description

@wstrange

It was really non obvious to me how I would scrape a replica set where the targets are dynamic pods. i.e. how does Prom know how/where to contact the dynamic pods?

The blog that connected the dots for me was:

http://marselester.com/prometheus-on-kubernetes.html

 source_labels: [__meta_kubernetes_pod_label_app]
        regex: hello-server

Means "look for a pod that has meta data app=hello-server".

A short example snippet connecting these concepts together would really help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p2Candidates for next primary.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions