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.yml
just 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.
kubectl apply -f volume/prometheus-host-path.ymlkubectl rollout status deploy prometheuskubectl port-forward service/prometheus --address 0.0.0.0 3000:9090"http://0.0.0.0:3000/prometheus/targets"
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 ...