This is K8s replica. But in the context with Dgraph, means about the same thing. K8s will spin up 3 Alphas and 3 Zeros pods. In the RAFT they will become (the alphas) Dgraph replicas.
They will talk to the Zero Group leader and ask to join the cluster. The zero will ask them to create an election. They will elect a leader. Based on the Zero configs they will organize themselves as replicas. Done.
It is fine to run like this in a dev environment. Avoid doing this in prod.
Yes. If you don’t set the replication factor in the replica flag(for the zeros). Each Alpha will be a group. So you will endup with 3 groups. That’s the default behavior. Sharding all along.
In your copy paste commands you shown --replicas 3, so I assumed you are doing replication.
I mentioned above. The statefulset replication just replicates the pods. The “magic” relies in the replica flag. Dgraph does all the election based on the RAFT Algorithm.