prometheus-operator: can not reload prometheus rule
What did you do?
First I use kubectl -n monitoring edit prometheusrule prometheus-k8s-rules to modify the rule, then I found the configmap prometheus-k8s-rulefiles-0 and the rulle file in pod has been changed.
Then I use kill -HUP pid in the pod to reload rules, but when the command is executed, it has no effect.
And I also use curl -XPOST http://ip:port/-/reload to reload rule. it also has no effect.
Environment
- Prometheus Operator version:
quay.io/coreos/prometheus-operator:v0.26.0
-
Kubernetes version information:
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-17T17:16:09Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.3", GitCommit:"5e53fd6bc17c0dec8434817e69b04a25d8ae0ff0", GitTreeState:"clean", BuildDate:"2019-06-06T01:36:19Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"} -
Kubernetes cluster kind:
kubespray -
Prometheus Operator Logs:
When I execute these two command, there is no new log for Prometheus Operator.
Can anyone tell me how to reload the prometheus rule correctly?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 33 (13 by maintainers)
Your
ruleSelectorappears to be inside ofsecurityContext. ThesecurityContextblock doesn’t look like it’s valid in that location eitherI logged into the node where the pod is located. Then find the Prometheus process in the node, and use
straceto trace thekillcommand. I found that the sighup signal didn’t reach the Prometheus process.