Vergie Hadiana
Vergie Hadiana

Reputation: 25

How to Connect using Port Forwarding Database Postgrsql on Openshift 3

I Have a problem on Connect from Port Forwarding Database on Openshift :

Running Pods Postgresql : Postgresql Pods have Been Running Detail Pods Postgresql

I Try Connect to Container running the database to check process and psql command, then it works : Connect inside container postgre

Next, I Try Port Forwarding for Try Connection from outside Openshift Cluster: Run port forwarding postgresql

Then I Try Connect from Outside Cluster to connect Postgresql have Error: Connection Refuse Im Using IP Based or Hostname / FQDN Not Working and Error Still Exist Error Try Connect Postgresql to Openshift

And When I Try Check Firewall port it has been opened port 5432/TCP : Check Ports Has Been Open or Not


Anyone Can Help Me With This problem ? Thanks

Note: Before I have Been Looking Documentation but Not Working Resolve the Problem Source Documentation: https://www.openshift.com/blog/openshift-connecting-database-using-port-forwarding

"psql: could not connect to server: Connection refused" Error when connecting to remote database

Upvotes: 1

Views: 1920

Answers (1)

Mike Organek
Mike Organek

Reputation: 12494

The oc port-forward command is forwarding from only your loopback interfaces.

If you are running your client on the same machine where the cluster is running, then use localhost as your "Host".

If you are running your client on a different machine, they you need more network redirection to get this to work. Please see this post for more information as well as work-arounds for your problem: Access OpenShift forwarded ports from remote host

Upvotes: 1

Related Questions