Yes single k8s node like minikube
I am talking about - k8s replica settings - replicas:3 [in bold]
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: dgraph-zero
spec:
serviceName: “dgraph-zero”
replicas: 3
Yes I have verified it will create a single Alpha group. But my question is I have not mentioned the replica settings for Dgraph RAFT group while creating zero statefulset.
I have omitted the container whole command section while deploying zero statefulset in dgraph-ha.yaml file.
command:
- bash
- “-c”
- |
set -ex
[[ hostname =~ -([0-9]+)$ ]] || exit 1
ordinal=${BASH_REMATCH[1]}
idx=$(($ordinal + 1))
if [[ $ordinal -eq 0 ]]; then
exec dgraph zero --my=$(hostname -f):5080 --raft=“idx=$idx” --replicas 3
else
exec dgraph zero --my=$(hostname -f):5080 --peer dgraph-zero-0.dgraph-zero.${POD_NAMESPACE}.svc.cluster.local:5080 --raft=“idx=$idx” --replicas 3
fi
And while deploying alpha statefulset also, I have omitted the container command section:
command:
- bash
- “-c”
- |
set -ex
dgraph alpha --my=$(hostname -f):7080 --zero dgraph-zero-0.dgraph-zero.${POD_NAMESPACE}.svc.cluster.local:5080,dgraph-zero-1.dgraph-zero.${POD_NAMESPACE}.svc.cluster.local:5080,dgraph-zero-2.dgraph-zero.${POD_NAMESPACE}.svc.cluster.local:5080
Then how all these three alphas create a single alpha group?