kube-prometheus
kube-prometheus copied to clipboard
PrometheusRule added up == 0 rule does not take effect
Add the up alarm rule as shown below in the PrometheusRule alarm rule file. After apply, the rule file is created successfully, but this file is never added in the /etc/prometheus/rules/prometheus-k8s-rulefiles-0 directory of prometheus.
Log in to one of the prometheus pods and go to the rules directory. There is still no rule file I just created.
I tried to delete the up rule, and I was able to successfully generate a rule alarm configuration file in the rules directory of prometheus.
My k8s version is eks-1.28.4, and the kube-prometheus version used is the latest 0.13.0 version