Kubernetes 101 : Unable to schedule a pod - resource requests exceeds the nodes "allocatable" memory -



The kubernetes scheduler may not be able start a pod on any node due to resource shortage.

We could check the "allocatable" resources in a kubernetes node using the below command - all the node have the same resources -:


We could see that our node has about 4G of memory and four core
CPU

If for example we schedule a Burstable pod with more than 100 MB of memory request - 500Mi  for example - , it may not be scheduled on any node of the cluster.

Below is an example of a pod that asks for more than the available 100 MB:


The available memory is about 100 MB - Allocatable memory minus the total requested memory, in the output of the "kubectl describe nodes" command -

We check the status of our pod:


We could check the cause the "Pending" state by using the below command:


The results show "insufficient" memory because the memory request of the "QoS-burstable" pod goes far beyond the memory that could be offered by any node of the kubernetes cluster.

Comments

Leave as a comment:

Archive