We plan to set up a ES cluster using Kubernetes. The k8s pod will consist of 3 data nodes and we intend to have persistent volume mapping for the data.
I am new to both ES and k8s but as I understand, in a pod, a volume is usually shared. But in this case, we should not share the data of the 3 instances. What is the best way to achieve volume mapping for a pod. If I have 3 instances, should I map each separately like /node1/data, /node2/data or should I just map to a single volume '/data' and ES will ensure that that data between the instances is isolated?
I am not sure if mapped volume should have node names like node1, node2 etc as explained above. Is the pod design of having 3 ES nodes (or multiple data nodes) correct? Can you specify different persistent volumes for different node instances in a pod?
What happens if the pod is terminated and a new pod is created? Should there be a strong binding between the mapped volume and nodename. What is the best practice to achieve this?