Question

K8s insufficient CPU even though there is enough CPU

I upgraded my cluster to use 4vCPU and 8GB memory nodes. The cluster has two of these nodes. I only added the NGINX Ingress Controller as an addon. I deployed two pods, each with 400M cpu limit and request. On the K8s Dashboard it shows that the nodes are each using about 1 CPU and 500M CPU worth of request/limit respectively. So there are still 3 CPUs worth of resources on each of them.

When I try to run a 3rd pod, with 400M CPU limit/request, I get insufficient CPU error.

Here is the request/limit that all three pods have configured. resources: limits: cpu: 400M memory: 400M requests: cpu: 400M memory: 400M

Resource and limit of the two nodes. 1.00 (25.05%) 502.00m (12.55%)

902.00m (22.55%) 502.00m (12.55%)

Error on the pod. Events: Type Reason Age From Message


Warning FailedScheduling <unknown> default-scheduler 0/2 nodes are available: 2 Insufficient cpu. Warning FailedScheduling <unknown> default-scheduler 0/2 nodes are available: 2 Insufficient cpu.

I upgraded my cluster to these more expensive nodes. I feel that the cheaper nodes should have handled my small load, but upgraded anyways. I am not going to upgrade again, 4 CPU and 8GB of ram of more sufficient (and pricey) than what I need, and yet I am still getting insufficient CPU.


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Was able to fix this issue. I switched how I requested for CPU resources.

old way: cpu: 400M

new way: cpu: “0.4”

This seemed to have worked.

ในนะ

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel