Waiting for all pods to start before running the container commands

Hello all,

I created a StatefulSet service (yb-master) with 3 pods (yb-master-0,1,2). The cname of the headless service seems to list the pods that are currently running, so right when my processes start, they are not able to resolve the addresses of the others (I am using podManagementPolicy: “Parallel”). But to establish quorum, I need to wait for all the pods to come up before trying to leader elect.

In the above scenario, is there some mechanism to wait for all the pods to come up before starting any of the processes?

Thank you

I did not find the right solution from the internet
References :


Hi there,

We updated our docs as well as the software today for Kubernetes-based installs (using StatefulSets). The combination of the latest release (0.9.4) and our new Kubernetes yaml file (linked from the docs) solves the problem you have noted – it did require an enhancement in yb-master.

Suggest you review this when you have a moment: https://docs.yugabyte.com/quick-start/install/#kubernetes

Let us know if you face any issues or have more questions.

1 Like