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
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
- ReadWriteOnce
- metadata:
Thanks!