Deploying Prometheus in Kubernetes

As we did with our application in the previous chapter, we could configure a pod based on the Prometheus Docker image and call it a day. It would work, but whenever the Prometheus pod rotated, we would lose all the metrics because pods are ephemeral by nature. To have a proper monitoring solution in place, we should deploy Prometheus as the stateful application that it is, and utilize the abstractions that Kubernetes provides, such as StatefulSets and PersistentVolumes, among others.

However, doing this is not so trivial, so we will instead use Helm to install a chart that will take care of correctly deploying and configuring Prometheus and its companions in our Kubernetes cluster for us. You can think of ...

Get Mastering Elixir now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.