Admin

Exposing Prometheus and Alertmanager

The Prometheus Operator takes care of operating Prometheus and Alertmanagers clusters, however, there are many ways in Kubernetes to expose these to the outside world. This document outlines best practices and caveats to do so in various ways.

NodePort

The easiest way to expose Prometheus or Alertmanager is to use a Service of type NodePort.

All Prometheus Pods are labeled with prometheus: <prometheus-name>, as the Prometheus object's name is main, the selector ends up being prometheus: main. Meaning, the respective manifest for the Service needs the selector to be prometheus: main.

It is highly recommended to compare the available ingress controllers for a production environment. The nginx ingress controller may or may not be what is suitable for your production environment. Also have a look at HA Proxy, Træfɪk, GCE, AWS, and more.