I am trying to deploy a Elasticsearch cluster(replicas: 3)
using Statefulset in kubernetes and need to store the Elasticsearch data in a Persistent Volume (PV). Since each Elasticsearch instance has its own data folder, I need to have separate data folder for each replica in the PV. I am trying to use volumeClaimTemplates
and mountPath: /usr/share/elasticsearch/data
but this is resulting in an error: pod has unbound immediate PersistentVolumeClaims
in the second pod. Hence how can I achieve this using Statefulset?
Thanks in advance.