ECK elasticsearch pod not starting on AKS : max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

When starting new eck cluster on AKS Elasticsearch pod doesnt start

ERROR: [1] bootstrap checks failed. You must address the points described in the following [1] lines before starting Elasticsearch.
bootstrap check failure [1] of [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
ERROR: Elasticsearch did not exit normally - check the logs at /usr/share/Elasticsearch/logs/Elasticsearch.log

Why is the docker image not configured already with correct values to start, it is possible to set this in yaml or what is workaround for this?

One workaround is to set it manually
sudo sysctl -w vm.max_map_count=262144

how do you setup this if you dont have access or permissions to the nodes by ssh? you need to run this on the host nodes or in the cointainer before starting Elasticsearch? when was this changed, cause i run a es pod months ago and this was not happening and now yes


Try like this,

kind: Elasticsearch
  name: quickstart
  version: 8.2.2
  - name: default
    count: 3
        - name: sysctl
            privileged: true
            runAsUser: 0
          command: ['sh', '-c', 'sysctl -w vm.max_map_count=262144']

For more info, Virtual memory | Elastic Cloud on Kubernetes [2.2] | Elastic

@agonzalez If you dont have access then probably you can disable the bootstrap checks as temporary solution by adding below entry in elasticsearc.yaml : false

Note that false is not just about disabling the max virtual memory bootstrap check. This is a boolean setting indicating whether or not memory-mapping is allowed. The default is to allow it. This setting is useful, for example, if you are in an environment where you can not control the ability to create a lot of memory maps so you need disable the ability to use memory-mapping.

See the Elasticsearch Index Store documentation.

1 Like

Yes thats right .

Disabling this option is just a temporary solution and should not be done for production clusters.

Ideally you need to get this done from admins if you don't have access :

sudo sysctl -w vm.max_map_count=262144

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.