What’s the best way to deploy the Prometheus monitoring stack with Flux on EKS?

0
0
Asked By CedarMosaic47 On

I'm building a personal SRE project with guidance from a mentor. The EKS cluster was provisioned with Terraform, and Flux was bootstrapped through Terraform as well. The setup is modular and configurable, with a remote Terraform backend and a Flux bootstrap module.

Now I want to deploy Prometheus, Grafana, and Alertmanager through Flux. I've been looking at the kube-prometheus-stack chart and the Prometheus Operator/kube-prometheus project. My mentor recommended deploying the applications with Flux HelmRelease resources, but keeping the monitoring-related CRDs separate rather than having the HelmRelease manage them.

What is the recommended repository and workflow for obtaining and managing those CRDs? Should I copy the CRD manifests from the Prometheus Operator/kube-prometheus project into a separate directory in my GitOps repository, apply them before the HelmRelease, and then let the HelmRelease install the monitoring components?

1 Answer

Answered By QuietHarbor8 On

Separating the CRDs from the HelmRelease is a sensible approach. Put the CRD manifests in a dedicated Flux-managed directory or separate Kustomization, and make the monitoring HelmRelease depend on that Kustomization so the CRDs are installed first. This also avoids having a chart upgrade or uninstall unexpectedly remove or change resources that other monitoring objects depend on.

Use the CRDs from the same Prometheus Operator version that your selected chart supports. The kube-prometheus project is a valid source, but don’t blindly copy an unrelated set of manifests—check the chart’s version and documentation, then pin the CRD files to a known version and update them deliberately. Keep the CRD installation and the Prometheus, Grafana, and Alertmanager workloads as separate Flux resources.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.