Elastic search always use all memory that I specify as limit to it, no mater how much I increase the limit and downgrade the mix/max heap size. The actual heap is using less than half of the max heap (2GB). The pod keep firing alarm that the memory is closed to the limit. It´s seems that this is by designed. How do configure Elasticsearch to no consume all available pod memory (requested) but no the limit.
spec: containers: - name: elasticsearch env: - name: ES_JAVA_OPTS value: -Xms2g -Xmx2g resources: requests: memory: 2Gi cpu: 0.5 limits: memory: 6Gi cpu: 2