Hi Community.
I have been trying to host / run elasticsearch on fargate but running into permission issues. the default init container definition looks osmething like this.
initContainers:
- name: init-sysctl
image: busybox
imagePullPolicy: IfNotPresent
securityContext:
privileged: true
command: ["sysctl", "-w", "vm.max_map_count=262144"]
but this throws an error on pod when you try to run this deployment.
if we remove the init container all together from the deployment then elasticsearch throws the following error.
[2] bootstrap checks failed. You must address the points described in the following [2] lines before starting Elasticsearch. For more information see [https://www.elastic.co/guide/en/elasticsearch/reference/8.11/bootstrap-checks.html]
bootstrap check failure [1] of [2]: max number of threads [1024] for user [elastic] is too low, increase to at least [4096]; for more information see [https://www.elastic.co/guide/en/elasticsearch/reference/8.11/max-number-threads-check.html]
bootstrap check failure [2] of [2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]; for more information see [https://www.elastic.co/guide/en/elasticsearch/reference/8.11/_maximum_map_count_check.html]
I have tried fixing this by attached the following configmap at path /etc/security/limits.conf
, but that had no impact.
* hard nproc 100000
* hard nproc 8192
* hard rss 10000
* soft nofile 8192
* hard nofile 8192
If we have a working chart that's used for elastic deployment on EKS Fargate then do share that as well.
Any help on the above issue will be great.