Setting heap size and jvm parameters on elastic docker image

Hi

I am using elasticsearch.k8s.elastic.co/v1 to deploy Elasticsearch defined here

When I have deployed to Kubernetes, I notice that the heap size is set to 1GB. I would like to increase it to 4GB.

How can I set the java override options and "-Xms1g -Xmx1g " via this yaml?

Thanks

Joe

You are looking for this specific section: https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-managing-compute-resources.html

How do I do it using this configuration? I notice that that spec uses a container.

apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: ingestion
spec:
  version: 7.6.2
  http:
    tls:
      selfSignedCertificate:
        disabled: true
    service:
      spec:
        ports:
          - name: http
            port: 9200
            targetPort: 9200
  nodeSets:
    - name: data
      count: 5
      config:
        node.master: false
        node.data: true
        node.ingest: true
        node.store.allow_mmap: false
      podTemplate:
        metadata:
          labels:
            app: elasticsearch
            service: ingestion

      volumeClaimTemplates:
        - metadata:
            name: elasticsearch-data
          spec:
            accessModes:
              - ReadWriteOnce
            resources:
              requests:
                storage: 1T
            storageClassName: ssd
    - name: master
      count: 3
      config:
        node.master: true
        node.data: false
        node.ingest: false
        node.store.allow_mmap: false
      podTemplate:
        metadata:
          labels:
            app: elasticsearch
            service: ingestion
          annotations:
            traffic.sidecar.istio.io/excludeOutboundPorts: "9300"
            traffic.sidecar.istio.io/excludeInboundPorts: "9300"
      volumeClaimTemplates:
        - metadata:
            name: elasticsearch-data
          spec:
            accessModes:
              - ReadWriteOnce
            resources:
              requests:
                storage: 300Gi
            storageClassName: ssd

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