Advanced configuration

edit

This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.

Setting JVM options

edit

You can change JVM settings by using the LS_JAVA_OPTS environment variable to override default settings in jvm.options. This approach ensures that expected settings from jvm.options are set, and only options that explicitly need to be overridden are.

To do, this, set the LS_JAVA_OPTS environment variable in the container definition of your Logstash resource:

apiVersion: logstash.k8s.elastic.co/v1alpha1
kind: Logstash
metadata:
  name: quickstart
spec:
  podTemplate:
    spec:
      containers:
        - name: logstash
          env:
            - name: LS_JAVA_OPTS   
              value: "-Xmx2g -Xms2g"

This will change the maximum and minimum heap size of the JVM on each pod to 2GB