<p>I'm running Openshift Container Platform 3.9 where I'm deploying three containers; a postgres database container, a qpid message broker container, and a server that needs to connect to both.</p>

<p>I need to set environment variables at pod creation in order to allow all three containers to connect. For example, I need to set DB_HOST and BROKER_HOST variables with the corresponding pod addresses. I was going to use pod presets to accomplish this, but per the documentation, <code>As of OpenShift Container Platform 3.7, pod presets are no longer supported</code>.</p>

<p>What is the best method to set these type of addresses during pod creation?</p>

Ciaodown
<p>the quick answer is: you don't</p>

<p>If you want to consume some service, define a <a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="nofollow noreferrer">Service</a> object for it so you get a fixed dns name you can use to refer to that service. And thenm you know the values of DB_HOST or BROKER_HOST in advance and set them in Pod as any other</p>
