These recipes cover what Kubernetes does to your pods at peak: CPU throttling, OOM kills, slow autoscaling, and 502s during deploys and node drains. If you fix one thing, set memory limits from measured usage. Start with Fix OOMKilled and Exit Code 137 in Kubernetes.
- Kubernetes CPU Throttling with Spare CPU on the Node
Size CPU requests from real usage and give limits room above them, or drop them, so CFS quota stops pausing pods on a node with CPU to spare.
- Kubernetes Graceful Shutdown Without 502s on Deploy
Hold each old pod in a preStop sleep until the load balancers drop it, then drain open requests on SIGTERM, so a rollout ends with no 502s.
- HPA Scaling Behavior That Keeps Up with Peak Traffic
Scale on a metric that leads the load, lower the target and keep spare node room, so the HPA adds pods before peak traffic starts to queue.
- Fix OOMKilled and Exit Code 137 in Kubernetes
Set Kubernetes memory limits from measured peak usage plus headroom, and cap the runtime below the limit, so pods stop dying with exit code 137.
- Pod Disruption Budget That Survives Node Drains
Give each service a PodDisruptionBudget and spread its pods across nodes and zones, so drains and upgrades evict one pod at a time.