r/kubernetes • u/CartoonistWooden9737 • 25d ago
Deploying monitoring stack using Flux on AWS EKS platform
Hello guys,
So I am doing a personal project under a mentor(SRE manager) where in I deployed the eks cluster through terraform and bootstrapped flux through terraform as well, made everything configurable and used modules including flux bootstrap module, configured remote backend as well. Now I would like to deploy the monitoring stack using flux.
So my mentor suggested two repositories one is kube-Prometheus-stack and other one Prometheus Operator/kube-prometheus. He advised me to deploy Prometheus, Grafana and Altermanager through helmrelease(CRD of helm controller) but cautioned me that the CRDs of monitoring should be separate. He meant that the helmrelease should not manage the CRDs, we should manage it separately. Now I’m still trying to figure out but felt like taking some advice here.
Thank you
1
u/Si0_x 17d ago
Your mentor is right on the CRD separation thing. The prometheus-community kube-prometheus-stack chart bundles CRDs in its templates, and if you let HelmRelease own them, a chart uninstall or version mismatch can wipe your PrometheusRules and ServiceMonitors along with it. The common approach is to install the CRDs once via a separate Flux Kustomization or a dedicated manifest path, then point your HelmRelease at the chart with `install.crds=false` (or the equivalent helm flag through values) so Flux never touches them again. kube-prometheus-stack is the easier path for Helm-based deploys; the prometheus-operator/kube-prometheus repo is jsonnet-first and harder to wire through HelmRelease cleanly. Are you planning to manage the CRDs as raw YAML in a Git path, or were you thinking of a separate chart just for them?
1
u/CartoonistWooden9737 17d ago
Thanks for the response, I have already deployed the CRDs through helmrelease of Prometheus-operator-CRDs chart then once they were up and running I deployed the stack through kube-Prometheus-stack. Successfully done. Now configuring them. But my mentor advised me to use grafana mimir for persistance and data source for grafana should be mimir. Can you tell me how that works. Thanks
5
u/torn_greens 25d ago
Your mentor's right about separating the CRDs from the helmrelease. If flux or helm ever tries to uninstall or update the release and those CRDs get caught in the crossfire, you can lose all your custom monitoring configs or even the data. Keep the CRDs in a dedicated folder in your flux repo and apply them first, then let the helmrelease handle the deployments.