You are looking at documentation for an alpha release. Not what you want? See Deploy Elasticsearch & Kibana on Kubernetes documentation.
Volume claim templates
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Volume claim templates
editBy default the operator creates a PersistentVolumeClaim with a capacity of 1Gi for every Pod in an Elasticsearch cluster. This is to ensure that there is no data loss if a Pod is deleted.
You can customize the volume claim templates used by Elasticsearch to adjust the storage to your needs. The name in the template must be elasticsearch-data:
spec:
nodes:
- volumeClaimTemplates:
- metadata:
name: elasticsearch-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
storageClassName: standard
If you want to use an emptyDir volume, specify the elasticsearch-data volume in the podTemplate:
spec:
nodes:
- config:
podTemplate:
spec:
volumes:
- name: elasticsearch-data
emptyDir: {}
Using emptyDir might result in data loss and is not recommended.