I need to create an elastic search cluster with one master and two data nodes

So how can I deploy in one statefulset?
or I need to deploy in separate statefulset for master and data plane and connect to it?