# Resources limits not being set and ES\_JAVA\_OPTS doesn't exist in pod

**URL:** <https://discuss.elastic.co/t/resources-limits-not-being-set-and-es-java-opts-doesnt-exist-in-pod/201258>\
**Category:** Elasticsearch\
**Created:** [September 26, 2019, 2:44pm UTC](https://discuss.elastic.co/t/resources-limits-not-being-set-and-es-java-opts-doesnt-exist-in-pod/201258 "2019-09-26T14:44:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leon\_Hatori](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leon_hatori/32/48089_2.png) [@Leon\_Hatori](https://discuss.elastic.co/u/Leon_Hatori)\
**Post date:** [September 26, 2019, 2:44pm UTC](https://discuss.elastic.co/t/resources-limits-not-being-set-and-es-java-opts-doesnt-exist-in-pod/201258/1 "2019-09-26T14:44:38Z")

</div>

Elastic container being evicted on kubernates over gcloud, I noted that the pod is consuming too much resources, over 5 gb of RAM, while the resource limits variables are not being set as you can see at the image bellow taked from the gcloud monitor panel, where the values are different from the config limits 2gb vs 3gb of RAM, 100m vs 2 of CPU

[![image](https://us1.discourse-cdn.com/elastic/original/3X/f/c/fc19a695a9fc6aaada1a6560a376f86a9c828fa7.png)](https://user-images.githubusercontent.com/5741150/65513602-e8556900-deb1-11e9-9113-37e69c00c71a.png)

I enter into the pod an noted that the ES\_JAVA\_OPTS enviroment vatiable does not exist there but was set as you can see at the configuration used to deploy showed bellow.

Config:

apiVersion: [elasticsearch.k8s.elastic.co/v1alpha1](http://elasticsearch.k8s.elastic.co/v1alpha1)  
kind: Elasticsearch  
metadata:  
name: elasticsearch  
spec:  
version: 7.2.0  
nodes:

- nodeCount: 1  
config:  
node.master: true  
node.data: true  
node.ingest: true
- podTemplate:  
spec:  
containers:

- name: elasticsearch  
env:
- name: ES\_JAVA\_OPTS  
value: -Xms3g -Xmx3g  
resources:  
limits:  
cpu: 2  
memory: 6Gi

- volumeClaimTemplates:
  - metadata:  
name: elasticsearch-data  
spec:  
accessModes:
    - ReadWriteOnce  
resources:  
requests:  
storage: 60Gi  
storageClassName: standard

Thanks!

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 27, 2019, 6:13am UTC](https://discuss.elastic.co/t/resources-limits-not-being-set-and-es-java-opts-doesnt-exist-in-pod/201258/2 "2019-09-27T06:13:22Z")

</div>

Can you please format the config correctly using the UI tools?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 25, 2019, 6:13am UTC](https://discuss.elastic.co/t/resources-limits-not-being-set-and-es-java-opts-doesnt-exist-in-pod/201258/3 "2019-10-25T06:13:25Z")

</div>

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