Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Kubelet has insufficient memory availible

I have run a standard GKE cluster on GCP. The cluster has 6GB memory and 6CPU, Sometime my apps get down due to memory pressure on the Kubernetes node, But it is sufficient
memory available when I checked, Can anybody explain that how kubernetes consider memory allocations?

Check the attached screenshot of the memory pressure from the Kubernetes console.

Screenshot from 2023-02-07 17-42-06.png

Screenshot from 2023-02-07 17-39-46.png

 

0 3 3,216
3 REPLIES 3

Hello vishalops,

Execute kubectl describe node <node-name> to check how much free memory is available there. Check the requests and limits of your pods. Note that Kubernetes will block the full amount of memory a pod requests regardless how much this pod uses.

Attached to this comment as well a documentation on possible solutions on how to fix the issue.

@dionv  I already check with describe node and there were sufficient resources available at that time.

vishalops_1-1675916167576.png

 

Also, I check with this command to check the resources memory usage and it was normal.
```

kubectl top pod --sort-by=memory

```

Hello vishalops,

Is the error still showing? Based on the similar cases that I found, it may be that because of the sudden spike or increase in workload. And to avoid this, they recommend 

1. You can decrease the running pods or the number of pods for your deployments, replicaSets etc per node will help to reduce the Write IOPS and the pressure on the disk.

2. You can create a new node pool with SSD as Boot Disk instead of using Standard Persistent Disk. As the Write IOPS for SSD is 30 per GB, you will get  high IOPS for all the applications and the processes and give better performance as well.

Top Labels in this Space