Pod Templateedit

Pod templates are the same you know and love from stateful sets and deployments. You can provide your own to add new settings, or merge settings with our defaults. For example, if you want to add new labels to your Pods, you can apply a Pod template as follows:

spec:
  nodeSets:
  - name: default
    count: 1
    podTemplate:
      metadata:
        labels:
          # additional labels for pods
          foo: bar

If you need to set resource requests and limits, see Managing compute resources.

Or if you want to install additional plugins, see Init containers for plugin downloads.

You might want to set environment variables to configure Elasticsearch. For example, to set the minimum and maximum JVM heap size to 2g and 4g respectively, you can modify the environment variables of the elasticsearch container as follows:

spec:
  nodeSets:
  - name: default
    count: 1
    podTemplate:
      spec:
        containers:
        - name: elasticsearch
          env:
          - name: ES_JAVA_OPTS
            value: "-Xms2g -Xmx4g"

For more information on Pod templates, see the Kubernetes documentation: