- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Core Tech
Kubernetes Prometheus Service Discovery Configuration
For Prometheus to scrape application metrics within a Kubernetes environment, an application ServiceMonitor needs to be created. In this lab, you will leverage labels to create a ServiceMonitor for the provided app, then validate that metrics are being collected both through Prometheus itself and through the use of PromQL queries within the Grafana UI.
Lab Info
Table of Contents
-
Challenge
Update the storefront application deployment
Update the application deployments to apply appropriate labels for Prometheus service discovery. Redeploy the application.
-
Challenge
Create a ServiceMonitor for the storefront application
Create a ServiceMonitor manifest for the supplied application, ensuring Prometheus will be able to scrape its metrics at the defined metrics endpoint (
/metrics). -
Challenge
Validate Prometheus metrics collection
Begin by accessing the Prometheus UI and ensuring the application target is up, then log in to the Grafana UI and use the Explore page to confirm you can query for Prometheus metrics for the application; finally, create a dashboard for the storefront application and create a panel containing information regarding application latency.
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.