How to connect nodes in Kubernetes before application startup?

I did not check it in Kubernetes, but my cloister does essentially this in AWS ECS.

The idea behind is simple: the library declares the application that connects nodes in its start_phase/3 callback.

You might do the same in your app’s start_phase/3 with libcluster, which would postpone application’s start/2 to return until the nodes are connected.