[SOLVED] – How to get the node info or inject data into a container?


I have containers in a cluster with multiple nodes. I want my containers to know which node they are running on, as my nodes are geographically separated and there are resources in the same data centre (services, database instances, etc) that they should use instead of using a remote resource in order to reduce latency.

Ideally, the container would have some way of knowing which node it is running on. But I can’t see a way to expose that information easily? A mount point that doesn’t replicate prevents migration – so that isn’t an option.

Am I going about this the wrong way, or is there an easy way to achieve what I’m trying to do?



Source link

Leave a Comment