liveBook · Manning

Service discovery

As explained in Machine Learning Platform Engineering

Service discovery is the automatic identification of available application services and their network locations.

Service discovery automatically identifies application services and their network locations. In a Kubernetes monitoring deployment, Prometheus uses it to find applications whose metrics can be scraped, allowing newly deployed services to enter monitoring without manually listing each target. section 3.5

Annotated metrics service

A pod declares prometheus.io/scrape: 'true', prometheus.io/path: '/metrics', and prometheus.io/port: '80'. Prometheus discovers the pod, scrapes its application metrics, and makes them available for PromQL queries and Grafana dashboards. section 3.5

How Machine Learning Platform Engineering covers it

How deep it goes
Explains pod annotations, metrics endpoints, target verification, and querying, without detailing the discovery mechanism’s internals.
Examples
Uses a FastAPI /metrics endpoint, Kubernetes scrape annotations, Prometheus targets, and Grafana request time series.
What you can do after
Operate/configure Prometheus to discover annotated application pods and verify that their metrics are scraped.
How it connects
Links Kubernetes applications with Prometheus, metrics scraping, Grafana, PromQL, and Alertmanager.

Also explained in

Compare how 7 books explain service discovery →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning Platform Engineering. The section links point to the parts of the book it draws on.