Reader small image

You're reading from  Kubernetes for Developers

Product typeBook
Published inApr 2018
Reading LevelIntermediate
PublisherPackt
ISBN-139781788834759
Edition1st Edition
Languages
Right arrow
Author (1)
Joseph Heck
Joseph Heck
author image
Joseph Heck

Joseph Heck has broad development and management experience across start-ups and large companies. He has architected, developed, and deployed a wide variety of solutions, ranging from mobile and desktop applications to cloud-based distributed systems. He builds and directs teams and mentors individuals to improve the way they build, validate, deploy, and run software. He also works extensively with and in open source, collaborating across many projects, including Kubernetes.
Read more about Joseph Heck

Right arrow

Using Prometheus to view application metrics


While you could add a job within Prometheus to include the configuration to scrape Prometheus metrics from a specific endpoint, the installation we did earlier includes a configuration that will update what it is looking at dynamically, based on annotations on pods. One of the benefits of Prometheus is that it has support for automatically detecting changes in your cluster, based on annotations, and it can look up the endpoints for the pods that back a service.

Since we deployed Prometheus using Helm, you can find the relevant configuration embedded within the values.yaml file. Look for the Prometheus job kubernetes-service-endpoints, and you will find both the configuration and some documentation of how it can be used. If you don't have the files locally, you can view this configuration at https://github.com/kubernetes/charts/blob/master/stable/prometheus/values.yaml#L747-L776.

This configuration looks for services within the cluster that have...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Kubernetes for Developers
Published in: Apr 2018Publisher: PacktISBN-13: 9781788834759

Author (1)

author image
Joseph Heck

Joseph Heck has broad development and management experience across start-ups and large companies. He has architected, developed, and deployed a wide variety of solutions, ranging from mobile and desktop applications to cloud-based distributed systems. He builds and directs teams and mentors individuals to improve the way they build, validate, deploy, and run software. He also works extensively with and in open source, collaborating across many projects, including Kubernetes.
Read more about Joseph Heck