I have enabled
bootstrap.memory_lock: true
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]: memory locking requested for Elasticsearch process but memory is not locked
I am deploying elastic cluster on kubernetes
initContainers:
- name: sysctl
image: busybox
imagePullPolicy: IfNotPresent
command: ["sysctl", "-w", "vm.max_map_count=262144"]
securityContext:
privileged: true
- name: swapiness
image: busybox
imagePullPolicy: IfNotPresent
command: ["sysctl", "-w", "vm.swappiness=1"]
securityContext:
privileged: true
# Increase the max number of open file descriptors.
- name: increase-fd-ulimit
image: busybox
imagePullPolicy: IfNotPresent
command: ["sh", "-c", "ulimit -n 65535 && ulimit -u 4096 && ulimit -l unlimited"]
securityContext:
privileged: true
i have tried populating in dockerfile as well
USER root
RUN echo "Add limits settings ...\n"\
&& echo -e "DefaultLimitNOFILE=65536\nDefaultLimitNPROC=32000\nDefaultLimitMEMLOCK=infinity" >> /etc/systemd/user.conf \
&& echo -e "* soft nofile 65536\n* hard nofile 65536\n* soft nproc 32000\n* hard nproc 32000\n* hard memlock unlimited\n* soft memlock unlimited" >> /etc/security/limits.conf \
&& echo -e "DefaultLimitNOFILE=65536\nDefaultLimitNPROC=32000\nDefaultLimitMEMLOCK=infinity" >> /etc/systemd/system.conf
but still not working