How can we mount NFS mount on elastic operator based pods (Elasticsearch on Kubernetes)

Hi Team,

I'm trying to use elasticsearch operator on our Kuberenetes cluster and found some limitations around volume mounts. Looks like with the current version it's only possible to attach storage volume and cloud plugins for backup storage. Is there a way or example available to attach NFS or any other storage to elastic operator based pods for backup configuration?


I am not sure I fully understand your question. What do you mean by

There is no such restriction. You can mount anything to the pods as you have full access to the podTemplate.

But we don't recommend using NFS for the Elasticsearch data directory for performance reasons. Now you mention "backup" and I am not sure how to understand that. Two thoughts on that though:

  1. Elasticsearch has built-in redundancy if you configure your indices to have replicas that provide some form of "backup" in case a node fails.
  2. Elasticsearch comes with a snapshot mechanism that allows you together with Snapshot Lifecycle Management to create backups of your data in regular intervals. You can choose from a variety of storage solutions for the snapshot repository (AWS S3, Azure, Google Storage, HDFS, Openstack Swift)

Please also have a look this related answer from @sebgl that gives a good overview of possible approaches to storage on ECK:

Thank @pebrc for your quick response.

Totally agree with you on using NFS volumes for data directory is not a good idea but my question is around snapshot repository setup and its underlying storage (Sorry I would have mentioned as snapshot directory instead of backups).

Regarding your point no 2: Do we have any plugin or a way to use NFS shared storage for snapshot repository. any available examples? this is mainly for non-cloud or openstack based storage solutions.

Thanks in advance!

You could mount your NFS volumes on the Elasticsearch pods and use the shared filesystem repository type in Elasticsearch to take snapshots: