Elasticsearch 6.2.3 docker container in Kubernetes problem

Hi can anyone help me with this problem,

i have new k8s cluster with 3 nodes 1.9.4 version and when i try to create a pod with the selected yaml file

apiVersion: v1
kind: Pod
metadata:
  name: elasticsearch
  labels:
    name: elasticsearch
spec:
  containers:
  - name: elasticsearch
    image: docker.elastic.co/elasticsearch/elasticsearch:6.2.3

it crashing with error

[Trovq04] max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

k.
so i googled some solutions but everything that i tried it i didnt have much luck resolving my issue,

i somehow exec the container and tried to set the vm_max_map to 262144 with the command

sysctl -w vm.max_map_count=262144

but it gives me error that is a read only file

ok, so i tried to set an enviroment in my configuration

apiVersion: v1
kind: Pod
metadata:
  name: elasticsearch
  labels:
    name: elasticsearch
spec:
  containers:
  - name: elasticsearch
    image: docker.elastic.co/elasticsearch/elasticsearch:6.2.3
    env: VM_MAX_COUNT
    value: "262144"

same error again, it is like it doesent even try to set the value,

can someone please help me with this problem, it was working before ive used this images in google cloud kubernetes clusters and i never had these problems,

Please Help.

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