❌ Myth: If I set cpu: 500m in my pod’s requests, Kubernetes reserves 0.5 CPU exclusively for my pod.
✅ Reality: Kubernetes does not reserve CPU like it does for memory. CPU is a compressible resource, meaning:
Your pod gets priority access to 500m CPU but can use more if available.
Other pods can borrow unused CPU from your pod if it's not using the full 500m.
If the node is under high load, the kernel’s CPU throttling kicks in, limiting your pod’s CPU usage.
📌 Example:
🔹 You set cpu: 100m request, but your pod only needs 50m most of the time.
🔹 Another pod on the same node borrows the remaining 50m CPU.
🔹 Later, when your pod suddenly needs 100m CPU, it may get throttled if the node is already overloaded.
💡 What to Do?
✅ Set realistic requests—don’t go too high or too low.
✅ Use CPU limits if you want to cap a pod’s max CPU usage.
✅ Monitor throttling using 'kubectl top pods' and Prometheus metrics.
Top comments (0)