# Elasticsearch on Kubernetes - low ulimit

**URL:** <https://forum.opensearch.org/t/elasticsearch-on-kubernetes-low-ulimit/2023>\
**Category:** Open Source Elasticsearch and Kibana\
**Created:** [December 18, 2019, 11:22am UTC](https://forum.opensearch.org/t/elasticsearch-on-kubernetes-low-ulimit/2023 "2019-12-18T11:22:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gusto2](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/gusto2/32/216_2.png) [@gusto2](https://forum.opensearch.org/u/gusto2)\
**Post date:** [December 18, 2019, 11:22am UTC](https://forum.opensearch.org/t/elasticsearch-on-kubernetes-low-ulimit/2023/1 "2019-12-18T11:22:00Z")

</div>

Trying to deploy the Opendistro ES to a Kubernetes cluster (based on [sample-code/open-distro-elasticsearch-kubernetes at main · opendistro-for-elasticsearch/sample-code · GitHub](https://github.com/opendistro-for-elasticsearch/community/tree/master/open-distro-elasticsearch-kubernetes))

However - I am unable to start the ES pod as it claims the ulimit nofile is too low:

```
max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]

```

Currently trying on minikube, but the destination cluster is AKS (Azure Kubernetes Service), yet I have little control over the cluster nodes

I was trying to update system values:

```
  initContainers:
  - name: init-sysctl-mapcount
    image: busybox:1.27.2
    command: ["sh", "-c", "sysctl -w vm.max_map_count=262144"]
    securityContext:
      privileged: true
  - name: init-ulimitn
    image: busybox:1.27.2
    command: ["sh", "-c", "ulimit -n 65536"]
    securityContext:
      privileged: true

```

where the sysctl command resolved the vm.max\_map\_count parameter, seems the ulimit stays low even mounting a limits.conf file with extended limits

---

<div class="post-metadata">

**Author:** ![gusto2](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/gusto2/32/216_2.png) [@gusto2](https://forum.opensearch.org/u/gusto2)\
**Post date:** [December 27, 2019, 1:06pm UTC](https://forum.opensearch.org/t/elasticsearch-on-kubernetes-low-ulimit/2023/2 "2019-12-27T13:06:40Z")

</div>

This issue appears using minikube, when deploying to EKS or AKS, seems the ulimits are updated by the initContainers statements
