Working with the New Prometheus Configuration
Explore how to work with Prometheus configuration in Kubernetes with a focus on volume types. Understand why hostPath is not ideal for configuration injection, and discover better practices like using custom images or configMap. This lesson also covers testing configuration changes and managing stateful configurations effectively.
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.
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 ...