Limit pods on Kubernetes

Nov 8, 2023

Today I learned that CPU limits on Kubernetes are often considered an antipattern and can be more harmful than beneficial.

CPU limits can cause throttling and prevent pods from accessing available resources when needed. Instead, it's recommended to use CPU requests to ensure pods receive the CPU they need without being throttled, while still preventing CPU starvation.

Memory, however, is treated differently (cannot be reclaimed), and it's advised to always use memory limits and requests, setting them equal to each other.