PCA Service Discovery & Configuration Flashcards
6 cards from real PCA practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 6 PCA Service Discovery & Configuration flashcards as text
Which Prometheus service discovery mechanism discovers targets using Kubernetes API watch calls?
Answer: kubernetes_sd_config
`kubernetes_sd_config` uses the Kubernetes API to discover pods, services, endpoints, ingresses, and nodes as scrape targets.
In Prometheus file-based service discovery, what file formats are supported?
Answer: JSON and YAML
Prometheus `file_sd_config` accepts target group files written in either JSON or YAML format.
How frequently does Prometheus reload file-based service discovery files by default?
Answer: Immediately via inotify/fsnotify
Prometheus uses filesystem notifications (inotify on Linux) to detect file_sd file changes and reloads them immediately without waiting for a timer.
What is the purpose of the `relabel_configs` section in a Prometheus scrape_config?
Answer: Transform or filter discovered target labels before scraping
`relabel_configs` runs a pipeline of label transformations on discovered target metadata, controlling which targets are scraped and how they are labeled.
Which relabeling action drops a target so Prometheus does not scrape it?
Answer: drop
The `drop` action in relabel_configs causes Prometheus to skip any target whose labels match the configured regex.
What meta-label does Prometheus kubernetes_sd_config expose for a pod's namespace?
Answer: __meta_kubernetes_pod_namespace
`__meta_kubernetes_pod_namespace` is the meta-label containing the Kubernetes namespace of a discovered pod target.