<p>So I have an API that's the gateway for two other API's.
Using docker in wsl 2 (ubuntu), when I build my Gateway API.</p>
<pre><code>docker run -d -p 8080:8080 -e A_API_URL=$A_API_URL B_API_URL=$B_API_URL  registry:$(somePort)//gateway  
</code></pre>
<p>I have 2 environnement variables that are the API URI of the two API'S. I just dont know how to make this work in the config.</p>
<pre><code> env:
    - name: A_API_URL
      value: &lt;need help&gt;
    - name: B_API_URL
      value: &lt;need help&gt;
</code></pre>
<p>I get 500 or 502 errors when accessing then in the network.
I tried specifyng the value of the env var as:</p>
<ul>
<li>their respective service's name.</li>
<li>the complete URI (http://$(addr):$(port)</li>
<li>the relative path : /something/anotherSomething</li>
</ul>
<p>Each API is deployed with a Deployment controller and a service
I'm at a lost, any help is appreciated</p>

<p>You just have to hardwire them. Kubernetes doesn't know anything about your local machine. There are templating tools like Helm that could inject things like Bash is in your <code>docker run</code> example but generally not a good idea since if anyone other than you runs the same command, they could see different results. The values should look like <code>http://servicename.namespacename.svc.cluster.local:port/whatever</code>. So if the service is named <code>foo</code> in namespace <code>default</code> with port 8000 and path /api, <code>http://foo.default.svc.cluster.local:8000/api</code>.</p>
