prometheus / prometheus/docs

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

Open Beginner friendly
#836 3 comments 38 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/enhancement
Dominant language
TypeScript
Stars
717
Forks
1.2k
Avg merge
3d 15h
Merged PRs (30d)
19

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing kubernetes_sd_configs documentation and the source_labels snippet in the issue. Add a short example connecting dynamic pod discovery, replica sets, and relabeling, then confirm that a newcomer can understand how Prometheus finds and contacts the pods.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.