kubectl top pod -n shopFix Kubernetes memory alerts without falling for the page cache trap
A practical Prometheus workflow so memory pages fire on RSS, OOMs, and real pressure, not because container_memory_usage_bytes wanted attention.
Learn how to redesign Kubernetes memory saturation alerts by comparing usage, working set, RSS, cache, limits, OOMKilled events, and promtool validation.
Created: August 26, 2026
Published: August 26, 2026
Linux
Diagnose from a Linux workstation with kubectl, the Prometheus API, and promtool.
kubectlcurlpromtool
kubectl describe pod -n shop checkout-api-7d9f | egrep -i 'oom|killed|memory|restart'curl -G 'http://localhost:9090/api/v1/query' --data-urlencode 'query=sum by (pod,container)(container_memory_working_set_bytes{namespace="shop",container!=""})'promtool test rules tests/k8s-memory-alerts.test.yamlContent locked
This guide requires both steps before full content is available.
- ○Click “Like” on this guide.
- ○Share on WhatsApp, X, LinkedIn, or copy the link.
Access is automatically unlocked as soon as both steps are completed.