<p>I'm having problems with a pod (running Keycloak) connecting to a database pod in another openshift project, on the same cluster.</p>

<h2>Version Info</h2>

<ul>
<li>OpenShift Master: v1.5.1+7b451fc</li>
<li>Kubernetes Master: v1.5.2+43a9be4</li>
</ul>

<h1>Problem</h1>

<p>In the Keycloak pod, the error I am getting is:</p>

<pre><code>01:29:20,245 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 28) WFLYCTL0013: Operation ("add") failed - address: ([
    ("subsystem" =&gt; "datasources"),
    ("data-source" =&gt; "KeycloakDS")
]) - failure description: "WFLYCTL0211: Cannot resolve expression 'jdbc:postgresql://${env.POSTGRES_PORT_5432_TCP_ADDR}:${env.POSTGRES_PORT_5432_TCP_PORT:5432}/${env.POSTGRES_DATABASE:keycloak}'"
</code></pre>

<p><strong>Troubleshooting</strong></p>

<p>I have tried the following:</p>

<p>I've tried pinging from a pod in another project.</p>

<pre><code>ping timescaledb.my-data-service.svc
</code></pre>

<p>and</p>

<pre><code>ping timescaledb.my-data-service.svc.cluster.local
</code></pre>

<p>In both cases I get the following error:</p>

<pre><code>From gateway (xx.xxx.0.1) icmp_seq=9 Destination Host Unreachable                                                                                                                      
</code></pre>

Magick
<p>Service is not pingable, since it's iptables-based and not a real ip. You can test the service with command like <code>curl $service:$port</code></p>
