We are using kubernetes. We have about 15 or so pods/services, about 3-4 statefulsets. Things work fine and we are happy with kubernetes so far.<p>However, for our dev setups and also for CI, we are looking for a better solution. These 15 services have a few hierarchical dependencies. For example, the postgres stateful set should be brought up first, followed by the users service and then the auth service.<p>The users/auth service will work fine (albeit returning 5xx errors) even without the other services being up. However, if all the services start together, they will all compete for the tiny amounts of CPU that we have given and eventually some starve and kind of gets into weird unrecoverable situations (in CI and test clusters where we can't give max cpu/mem).<p>I know of ways to increase the cpu/mem limit but keep the initial allocations, small. But I believe that since I know about service dependencies better, if I bring up kubernetes pods/services in a hierarchical way, it would be far more useful for me.<p>Do any of you that use kubernetes, use any tools/hacks/techniques to bring up pods/services in particular order (without lots of kubectl waits) ? In the past, with `docker-compose` I was able to achieve this via service dependencies but can't find similar in kubernetes. Any pointers ?
How about some kind of startup condition as a proxy for your original entrypoint?<p>May I ask why you're running DB and stateful systems in k8s in the first place? The benefits of doing it is not likely to outweigh the difficulty of getting it right.