title: Communication between pods on different namespaces
body: <p>I have an application pod running on a namespace named frontend and a database pod running on a different namespace named backend. I need to have communication between both the pods residing in different namespaces. The database container is up and running but while the application container has an error of crashloopbackoff. </p>
  
  <p>When I saw the logs of the application pod, there is an error while resolving the database hostname which was provided through the environment variable PGHOST and was equal to the name of the database container. But it seems that the application container is unable to resolve the database host.</p>
  
  <p>Therefore, how should I connect them. I suppose that the problem is due to different namespaces. So how do I connect them and make them communicate.</p>
  
  <p>error:</p>
  
  <pre><code>&gt; The Gemfile's dependencies are satisfied rake aborted!
  &gt; PG::ConnectionBad: could not translate host name "postgres" to
  &gt; address: Name or service not known
  </code></pre>