How can I mount a hostPath into each pod in a statefulset when I don't know the names of the nodes in advance (so can't pre-create a PV on each node)?
I want to set up an elasticsearch cluster on a number of nodes, mounting each elasticsearch data directory onto the SSD of the host node...
How can I accomplish this with a statefulset?
Instead of a HostPath Volume, you should use a Local Persistent Volume for this kind of use cases.
Consider using local static provisioner for this, it has instructions for Baremetal environments.