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.
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.
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.