Question

Unsufficient CPU for pod despite low CPU usage

I have a Kubernetes cluster running several review environments. According to the graphs on in the Digital Ocean console, it’s CPU usage is at ~10%, with at most spikes up to 30% CPU. Yet, when I try to deploy a Helm chart, I see my pod has the following status:

status:
  conditions:
  - lastProbeTime: null
    lastTransitionTime: "2020-07-01T13:54:51Z"
    message: '0/4 nodes are available: 4 Insufficient cpu.'
    reason: Unschedulable
    status: "False"
    type: PodScheduled

What could be causing this?


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.

John Kwiatkoski
DigitalOcean Employee
DigitalOcean Employee badge
July 1, 2020
Accepted Answer

Hi there,

I would check to see what requests for CPU are being made by the desired chart. Keep in mind that the full system resources are not available to pods as each node does require overhead for system processes and containerized infrastructure.

You can see the available memory chart for our node sizes here: https://www.digitalocean.com/docs/kubernetes/#allocatable-memory

That does not list the requests for CPU but looking at my own cluster in kube-system the default kube-system pods request almost ~700m or 70% of all the CPU available on a 1 CPU node.

You have a few options here:

  1. Use larger nodes. This step would require the least amount of effort as there’s no need to change any app configuration. It also directly addresses the underlying problem of not having enough resources in the cluster.

  2. remove/reduce your helm chart’s requests. This is an okay option to get it past the deployment step but is normally not a good idea as it could overload your cluster and cause outages for other applications.

  3. Reduce your workloads to make room for the new deployment. Getting rid of other resource heavy workloads would free up space for this deployment

I personally would just recommend the simplest path, which would to be to use larger nodes. Hope this helps!

Regards,

John Kwiatkoski Senior Developer Support Engineer - Kubernetes

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