...

/

Working with the New Prometheus Configuration

Working with the New Prometheus Configuration

Explore the modified configuration of Prometheus and look into the dos and don'ts of hostPath.

Testing the new configuration

Let’s see whether Prometheus with the new configuration works as expected. As described earlier, the external URL is also changed for prometheus-host-path.ymljust like prometheus. You can confirm it in the playground at the end of this lesson at line 49 in the prometheus-host-path.yml file.

Press + to interact
kubectl apply -f volume/prometheus-host-path.yml
kubectl rollout status deploy prometheus
kubectl port-forward service/prometheus --address 0.0.0.0 3000:9090
"http://0.0.0.0:3000/prometheus/targets"
Prometheus targets screen
Prometheus targets screen

Where to use hostPath

The next logical step would be to configure Prometheus with additional targets. Specifically, we may want to configure it to fetch metrics that are already made available through the Kubernetes API. We, however, will not be doing this. First of all, this chapter is not about monitoring and alerting. The second and more important reason is that using the hostPath volume type to provide configuration ...