K8s cluster memory decreases when running an Apache Flink Job K8s cluster memory decreases when running an Apache Flink Job kubernetes kubernetes

K8s cluster memory decreases when running an Apache Flink Job


Your configuration looks fine. It's most likely an issue with your code and some kind of memory leak. This is a very good answer describing what may be the problem.

You can try setting a limit on the JVM heap with taskmanager.memory.task.heap.size that you give the JVM some extra room to do GC, etc. But in the end, if you are allocating something that is not being referenced you will run into the situation.

Presumably, you are using your memory to store your state in which case you can also try RockDB as a state backend in case you are storing large objects.


What are your requests/limits in you deployment templates? If there are no specified request sizes you may be seeing your cluster resources get eaten.