How to find out the minimum and maximum usable CPU and memory space left on a kubernetes node

3/31/2017

I'm trying to deploy Magento on a GCE n1-standard-1 machine, but I keep getting the following error message.

pod (magento-magento-1486272877-zd34d) failed to fit in any node fit failure summary on nodes : Insufficient cpu (1)

I'm using the official Magento helm chart, and I've configured the values.yml file to contain very low CPU requests: cpu: 25m

When I look at the node details on the kubernetes dashboard, I see that my CPU is already spinning at 0.728 (72.80%) while it's not even doing anything besides the system containers. Also see image below:

kubernetes standard n1-standard-1 resources

Does this mean I have 1 - 0.728 = 0.272m left for container requests? Then why is kubernetes still telling me that it has insufficient CPU when specifying 0.25m?

Thanks for your help.

-- Hyperfocus1337
kubernetes
kubernetes-helm

2 Answers

11/1/2017

There is a nifty kubectl command to get information about your nodes resources...

kubectl top nodes

And pods...

kubectl top pods

Pods with containers

kubectl top pods --containers=true

-- Kevin Mansel
Source: StackOverflow

3/31/2017

I didn't see that the CPU limits were 0.248 according to the picture in my post, so I put cpu: 20m and it worked.

-- Hyperfocus1337
Source: StackOverflow