<p>i am trying to connect dbeaver from outside the cluster but it seems i can't establish the connection with the pgsql, have tried port forwarding in kubernetes but still it didn't solved the problem, just point which all things i should check?</p>
<p>Edit1: kubernetes in running in remote ubuntu box and am dbeaver is in my machine which is having a different ip address? kubernetes is not running on my machine.</p>

marco525
<p>Yes, it's possible. Thanks @Turing85 and @AndD.</p>
<p>My postgres pod is running in Kubernetes cluster eg.(IP:192.168.0.1).</p>
<ol>
<li><p>Logged into the cluster and fired this command:</p>
<p>kubectl get services</p>
</li>
<li><p>After getting services fired below command to map external ip to my service, i have exposed it to same ip where cluster is running.</p>
<p>kubectl patch svc backend -p '{&quot;spec&quot;:{&quot;externalIPs&quot;:[&quot;192.168.0.1&quot;]}}'</p>
</li>
</ol>
<p>detailed example: <a href="https://stackoverflow.com/questions/44519980/assign-external-ip-to-a-kubernetes-service">Assign External IP to a Kubernetes Service</a></p>
<ol start="3">
<li>After that just provided connection settings(ip,dbusername,dbname,passowrd,port) in dbeaver and it worked.</li>
</ol>
