Pardon my ignorance as I’m new to Kubernetes. I’m trying to monitor my nginx-ingress using prometheus.

I initially installed the ingress using this tutorial which has you install the helm stable/nginx-ingress chart.

Then I installed the Kubernetes Monitoring Stack

Next I discovered you needed to enable metrics on the ingress-controller to expose them to prometheus. I used helm upgrade to set controller.metrics.enabled on the ingress. This had the effect of creating a new service nginx-ingress-controller-metrics but still no stats in prometheus.

Finally, I found this issue which said you needed to create a prometheus job to scape the ingress metrics. Unfortunately, it didnt say how to add the job.
Since the monitoring stack uses promethius-operator I ended up following this method to add the job (i think). Following these instructions I created a secret of the job as outlined in the stack overflow answer, added that secret to the promethius-operator namespace, then referenced it in spec.additionalScrapeConfigs on prometheus-operator-prometheus

That’s where I’m at now and still no luck seeing the ingress metrics. Any guidance would be much appreciated. Thanks in advance!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

1 answer

Hey @owise1
did you managed to get the ingress metrics into prometheus operator?

I’m running the same stack and facing the same problem…
Would be great if you could share your solutions.

Thanks in advance!

Submit an Answer