All the times I scale a statefulset the pods are started in different nodes.
I have tried to find documentation about this but I have not found anything.
Is this a default behavior of the Statefulset objects?
Thank you.
You can control the scheduling of your pods by editing the affinity of the statefulset. (https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity)
But be aware that running all instances of a statefulset on one node causes an outage of your service if that node fails/dies. I would absolutely not recommend to schedule all instances of a statefulset on a single node.