How to avoid pod use all memory limits

How do configure Elasticsearch to no consume all available pod memory (requested) but no the limit.

To do that you would want to lower the limit. The OS will use the memory you allow it to cache data. For monitoring Elasticsearch it is more useful to look at the JVM heap usage rather than the pod memory used. The ES docs have additional info on memory usage: Heap size settings | Elasticsearch Guide [8.11] | Elastic