Over its CPU limit, your pod slows down. Over memory, it dies.
transcript
Your pod goes over its CPU limit. It just slows down. It goes over its memory limit. It gets killed.
First, what's a container? Just a process, with its own namespaces. Inside, nginx thinks it's process 1. It gets its own IP address, ports and routes. But the host knows it as process 25,463. Just another process.
Cgroups decide what it can use. Say a CPU limit of half a core. And a memory limit of 512 mebibytes. Now cross each one.
Cross the CPU limit, and you're throttled. Fewer time slices. CPU can be squeezed. You just run slower. But memory can't be squeezed. Over the limit, the OOM killer ends the container. So Kubernetes restarts it.
Here's why it matters. A memory leak restarts your pods. A CPU spike just slows them down.
One limit is compressible. The other is a hard wall. CPU bends. Memory breaks.
Full breakdown in the lecture.