How to monitor Jobs with the Prometheus Operator?

521 Views Asked by At

I have a need to monitor some jobs in Kubernetes.

I see two differents ways to monitor with the Operator: PodMonitor vs Service Monitor.

What would you recommend when it comes to monitoring jobs ?

1

There are 1 best solutions below

0
On BEST ANSWER

By nature, jobs do not have services. Instead, they generate temporary pods to run a job. This doesn't fit well into a service-based discovery of Prometheus. Thus I recommend using a PodMonitor for Jobs.