Working with the New Prometheus Configuration
In this lesson, we will test 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.
Press + to interact
cat volume/prometheus-host-path.yml \| sed -e \"s/192.168.99.100/$(minikube ip)/g" \| kubectl apply -f -kubectl rollout status deploy prometheusopen "http://$(minikube ip)/prometheus/targets"
We applied the new definition (after the sed
“magic”), we waited until the rollout
finished, and we then opened the Prometheus targets in a browser. This time, with the updated configuration, Prometheus is successfully pulling data from the only target currently configured.
Prometheus targets screen
Where to Use hostPath
The next logical step would be to configure Prometheus with additional targets. Specifically, you may want to configure it to fetch metrics that are already made available through the Kubernetes API. We, however, ...
Access this course and 1400+ top-rated courses and projects.