Don't set Kubernetes CPU limits

A few years ago, a colleague mentioned that they stopped setting Kubernetes CPU limits at his company.

Their request latencies dropped, and they needed fewer nodes in production.

I read Release It! back then and thought you should always limit resources used in production.

Today, I advocate for limiting everything in production except for the CPU limits for a Kubernetes pod.

That means you should set your memory requests and limits, as well as your CPU requests, to guarantee that your workload has enough baseline capacity.

However, setting the CPU limits on all your pods will severely throttle your cluster, and you’ll underutilize your compute resources.

There’s a great article that explains it much better than I can, as well as the accompanying image:

Kubernetes CPU Limits Chart

All credit for the image goes to Natan Yellin at robusta.dev.


Join the 80/20 DevOps Newsletter

If you're an engineering leader or developer, you should subscribe to my 80/20 DevOps Newsletter. Give me 1 minute of your day, and I'll teach you essential DevOps skills. I cover topics like Kubernetes, AWS, Infrastructure as Code, and more.

Not sure yet? Check out the archive.

Unsubscribe at any time.