Interview Prep/SRE & Reliability/Burn-Rate Alerts & Alertmanager

Applying your `PrometheusRule` fails with `admission webhook "prometheusrulevalidate.monitoring.coreos.com" denied the request: Rules are not valid`.

BeginnerTroubleshootingBurn-Rate Alerts & Alertmanager
Answer

Likely causes → The Prometheus Operator's admission webhook found invalid PromQL or invalid rule fields (wrong indentation, expr missing, invalid duration like for: 2min).

Diagnose →

yq '.spec' checkout-slo.yaml > /tmp/rules.yaml
promtool check rules /tmp/rules.yaml

Fix → Fix the reported expression or field (durations use 2m, not 2min) and reapply.

Prevent → Keep rules as plain Prometheus rule files tested with promtool, and wrap them into the CRD in CI.

All SRE & Reliability questions

More on Burn-Rate Alerts & Alertmanager