my machine have enough memory, but the kubernetes can not schedule the pod and indicate that Insufficient memory my machine have enough memory, but the kubernetes can not schedule the pod and indicate that Insufficient memory kubernetes kubernetes

my machine have enough memory, but the kubernetes can not schedule the pod and indicate that Insufficient memory


Kubernetes preserves the node stability instead the resource provisioning, the memory available is not calculate based on free -m command, as the documentation mention:

The value for memory.available is derived from the cgroupfs instead of tools like free -m. This is important because free -m does not work in a container, and if users use the node allocatable feature, out of resource decisions are made local to the end user Pod part of the cgroup hierarchy as well as the root node. This script reproduces the same set of steps that the kubelet performs to calculate memory.available. The kubelet excludes inactive_file (i.e. # of bytes of file-backed memory on inactive LRU list) from its calculation as it assumes that memory is reclaimable under pressure.

You could use the script mentioned above to check your memory available in the nodes and if there's no available resource you will need to increase the cluster size adding a new node.

Additionally, you can check the documenation page for more information about resources limits