Memory working set as a percentage of the container limit?
IntermediateProductionRapid-Fire PromQL & LogQL
Answer
100 * sum by (namespace, pod, container) (container_memory_working_set_bytes{container!=""})
/ sum by (namespace, pod, container) (kube_pod_container_resource_limits{resource="memory"})
Working set is what the OOM killer looks at, not container_memory_usage_bytes (which includes reclaimable page cache).
More on Rapid-Fire PromQL & LogQL
Requests per second per service over the last 5 minutes?BeginnerPercentage of 5xx responses per service?Beginnerp99 latency per route from a histogram?IntermediateTop 5 pods by CPU usage in a namespace?BeginnerWhich scrape targets are down right now?BeginnerWhich filesystems will fill up within 4 hours?Intermediate