I am currently working on a project that uses the Prometheus Server (Not the Prometheus Operator). We're looking to introduce a way of modifying the PrometheusRules without having to redeploy it.
I'm completely new to containers and Kubernetes and a little over my head so I'm hoping someone could let me know if I'm wasting my time trying to make this work.
What I have thought of doing so far is:
Thanks
Your initial use case seems valid, though I would say there are better ways of achieving this.
For points 1,2 I would suggest you use the Prometheus Helm Chart for ease of use, better config management and deployment. This would keep track of Prometheus configuration as one single unit rather than maintaining the rule files separately.
For point 3,4:- Making direct untracked changes to the live configuration does not seem safe or secure. Using the helm chart mentioned above I would suggest you make the changes before deploying to the cluster (Use VCS like Git to track changes)
Best case scenario:- Also setup CI/CD pipelines to deploy changes instantly.
Use the reload API as mentioned to reload the new released config.
Explore more about Helm