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.


Master GitHub Actions with a Senior Infrastructure Engineer

As a senior staff infrastructure engineer, I share exclusive, behind-the-scenes insights that you won't find anywhere else. Get the strategies and techniques I've used to save companies $500k in CI costs and transform teams with GitOps best practices—delivered straight to your inbox.

Not sure yet? Check out the archive.

Unsubscribe at any time.