Resources limits not being set and ES_JAVA_OPTS doesn't exist in pod

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

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
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!

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

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