<p>When trying to deploy the JHipster Console on Kubernetes the jhipster-elasticsearch-client pod fails to start. The pod fails with reason <code>OOMKilled</code> and exit code <code>137</code>.</p>

<p>Increasing the default memory limit from 512M to 1G did not solve the issue.</p>

<p>The node also has plenty of memory left:</p>

<pre><code>Non-terminated Pods:         (9 in total)
  Namespace                  Name                                              CPU Requests  CPU Limits  Memory Requests  Memory Limits
  ---------                  ----                                              ------------  ----------  ---------------  -------------
  default                    gateway-mysql-5c66b69cb6-r84xb                    0 (0%)        0 (0%)      0 (0%)           0 (0%)
  default                    jhipster-console-84c54fbd79-k8hjt                 0 (0%)        0 (0%)      0 (0%)           0 (0%)
  default                    jhipster-elasticsearch-client-7cb576d5d7-s48mn    200m (10%)    400m (20%)  512Mi (6%)       1Gi (13%)
  default                    jhipster-import-dashboards-s9k2g                  0 (0%)        0 (0%)      0 (0%)           0 (0%)
  default                    jhipster-registry-0                               0 (0%)        0 (0%)      0 (0%)           0 (0%)
  default                    jhipster-zipkin-6df799f5d8-7fhz9                  0 (0%)        0 (0%)      0 (0%)           0 (0%)
  kube-system                calico-node-hc5p9                                 250m (12%)    0 (0%)      0 (0%)           0 (0%)
  kube-system                kube-proxy-cgmqj                                  0 (0%)        0 (0%)      0 (0%)           0 (0%)
  kube-system                tiller-deploy-5c688d5f9b-zxnnp                    0 (0%)        0 (0%)      0 (0%)           0 (0%)
Allocated resources:
  (Total limits may be over 100 percent, i.e., overcommitted.)
  CPU Requests  CPU Limits  Memory Requests  Memory Limits
  ------------  ----------  ---------------  -------------
  450m (22%)    400m (20%)  512Mi (6%)       1Gi (13%)
</code></pre>

BHarman
<p>The default installation of Elasticsearch is configured with a 1 GB heap. You can configure the Docker Elasticsearch memory requirements by adding an ENV variable to your container:</p>

<pre><code>- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
</code></pre>

<p>Related Docs:</p>

<ul>
<li><a href="https://www.elastic.co/guide/en/elasticsearch/guide/current/heap-sizing.html" rel="nofollow noreferrer">https://www.elastic.co/guide/en/elasticsearch/guide/current/heap-sizing.html</a></li>
<li><a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html" rel="nofollow noreferrer">https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html</a></li>
</ul>
