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?
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.
Yes, it's possible. Thanks @Turing85 and @AndD.
My postgres pod is running in Kubernetes cluster eg.(IP:192.168.0.1).
Logged into the cluster and fired this command:
kubectl get services
After getting services fired below command to map external ip to my service, i have exposed it to same ip where cluster is running.
kubectl patch svc backend -p '{"spec":{"externalIPs":["192.168.0.1"]}}'
detailed example: https://stackoverflow.com/questions/44519980/assign-external-ip-to-a-kubernetes-service