PrometheusRule created but rules don't show in Prometheus
IntermediateTroubleshootingKubernetes monitoring and the Prometheus Operator
Answer
Likely causes → ruleSelector/ruleNamespaceSelector mismatch, or the admission webhook rejected invalid PromQL.
Diagnose →
kubectl get prometheusrule -A --show-labels | grep myrules
kubectl get cm -n monitoring | grep rulefiles
kubectl logs -n monitoring deploy/prometheus-operator | grep -i rule
Fix → Add the selector label, fix the expression (promtool check rules on the extracted spec).
Prevent → Keep the Operator's admission webhook enabled so bad rules fail at kubectl apply.
More on Kubernetes monitoring and the Prometheus Operator
A new ServiceMonitor is not picked up by the Prometheus OperatorIntermediateServiceMonitor is selected but its targets don't appear on `/targets`IntermediateServiceMonitor target appears but Operator logs `skipping servicemonitor ... failed to get secret`AdvancedPodMonitor targets show `DOWN` with `connection refused` on port 8080 while the app listens on 9090Beginner`KubeletDown` / `TargetDown` alerts fire for kube-scheduler and kube-controller-manager on EKS/GKEBeginnerOn kubeadm clusters, `kube-controller-manager` and `kube-scheduler` targets are `DOWN` with `connection refused`Intermediate