YugaByte DB Community Forum

Waiting for all pods to start before running the container commands


#1

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 :

https://groups.google.com/forum/#!msg/kubernetes-users/WMPoi3Nk6oc/9QfFu1wNAwAJ

Blockchain Marketing Examples


#2

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.
Thanks