<p>Is there anyway I can tell Kuberbetes how to schedule the replicas in the statefulset? For example, I have nodes divided into 3 different availability zones (AZ). I have labeled these nodes accordingly. Now I want K8s to put 1 replica in each AZ based on node label. Thanks</p>

Kenneth
<p>Pods will always try to be scheduled across different nodes, to achieve what you are looking for you can try to use <code>DaemonSet</code>, which will allow only one of these kind of pods in each node.</p>

<p>Also, you can use anti affinity based on the already scheduled pods in that node.</p>

<p><a href="https://kubernetes.io/docs/concepts/configuration/assign-pod-node/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/configuration/assign-pod-node/</a></p>
