Is there a way to free up memory on Kubernetes nodes by removing old or extra logs? Would there be another way?

Viewed 26

only for the beta version, I have 7 nodes running at the movement.

Currently, I have less CPU usage but high memory consumption Whenever the memory usage increases, my system creates new nodes.

Can you suggest any way for me to save memory and avoid new nodes? How do I clear the logs for a specific pod or node? What can I do to troubleshoot the memory consumption issue?

Thanks in Advance.

enter image description here

1 Answers

You should be able to monitor memory consumption from Cloud Console from Monitoring Explorer or from GKE dashboards. But logs are not related to memory consumption as logs are written to disk they are usually not kept in memory, although it depends on the application implementation.

To troubleshoot memory consumption and to save memory, you need to look into your application, why it uses the memory and troubleshoot accordingly.

From GKE side, you can try to use an optimize-utilization autoscaling profile, it will scale down nodes faster and will try to use less resources:

Related