Interview Prep/Monitoring & Observability/Prometheus and PromQL at Scale

A new app team wants to be monitored on your Kubernetes cluster using the Prometheus Operator. What do you give them?

BeginnerScenarioPrometheus and PromQL at Scale
Answer

Situation read → With the Operator, teams self-serve using CRDs. They do not edit prometheus.yml.

What I'd do →

  1. The app exposes /metrics on a named port in its Service.
  2. The team creates a ServiceMonitor selecting that Service.
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata: {name: checkout, labels: {release: kube-prometheus-stack}}
spec:
  selector: {matchLabels: {app: checkout}}
  endpoints: [{port: http-metrics, interval: 30s}]
  1. They add alerts as a PrometheusRule.
  2. Confirm the target appears under Status → Targets.

Why → The Operator reconciles CRDs into Prometheus config, so teams get safe self-service.

Interview tip → The release label must match the Prometheus serviceMonitorSelector, which is the usual first mistake.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Prometheus and PromQL at Scale