How to expose PostgreSQL OpenShift/Kubernetes service listening on 5432 to the external world?

7/1/2016

It seems that external IP address can be assigned while creating a service in Kubernetes/OpenShift. Is there a possibility to use OpenShift routes for the same so that I don't have to manage/get externally routable IP address. Is it possible to expose a Postgres OpenShift/Kubernetes service listening on 5432 as a OpenShift route listening on 5432?

-- Anand Patel
kubernetes
openshift

1 Answer

7/1/2016

You can use the NodePort feature of services to expose a port on every node in the cluster. You can assign a floating VIP to one of your nodes and set the service ExternalIP field on the service.

-- Clayton
Source: StackOverflow