Deploying the Prometheus Stack
So far, we’ve found how to access the Kubernetes metrics endpoint; next, we’re going to deploy Prometheus using the kube-prometheus-stack
project (https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack) from the Prometheus Community. This chart combines the Prometheus project with Grafana and Alertmanager to create a mostly complete monitoring solution. We’ll walk through some of the gaps later in the chapter. First, let’s get Prometheus deployed:
$ cd chapter15/simple
$ ./deploy-prometheus-charts.sh
This script creates the monitoring namespace, deploys the Helm chart, and creates an Ingress object with the host prometheus.apps.X-X-X-X.nip.io
, where X-X-X-X
is your API server’s IP address but with dashes instead of dots. For me, my API server is running on 192.168.2.82
, so, to access the Prometheus UI in my browser, I go to https://prometheus.apps.192-168-2-82.nip.io/
.