<p>I have a local kubernetes cluster setup using the edge release of docker (mac). My pods use an env var that I've defined to be my DB's url. These env vars are defined in a config map as:</p>

<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: my-config 
data:
  DB_URL: postgres://user@localhost/my_dev_db?sslmode=disable
</code></pre>

<p>What should I be using here instead of localhost?  I need this env var to point to my local dev machine.</p>

<p>You can use the private lan address of your computer, but please ensure that your database software is listening to all network interfaces and there is no firewall blocking incoming traffic.</p>

<p>If your LAN address is dynamic, you could use an internal DNS name pointing to your computer if your network setup provides one.</p>

<p>Another option is to run your database inside the kubernetes cluster: this way you could use it's <code>service</code> name as the hostname.</p>
