Measuring Containers Memory and CPU Usage
Explore how to observe and measure memory and CPU usage of containers in Kubernetes over time. Understand how to use Prometheus queries to track resource consumption, identify peaks, and capture dynamic changes to optimize container resource definitions.
Observe metrics over time
If you are familiar with Kubernetes, you understand the importance of defining resource requests and limits. Since we already explored kubectl top pods command, you might have set the requested resources to match the current usage, and you might have defined the limits to be above the requests. That approach might work on the first day. But, with time, those numbers will change, and we will not be able to get the full picture through kubectl top pods. We need ...