Create a externalName service to point to a route in another project in OpenShift

8/29/2017

We are using openShift V3 Enterprise product. I would like to create a externalName type service called serviceA in ProjectA and it will point to a route in projectB. and I will create a another route in ProjectA which will point to ServiceA service.

Is this possible to do?

Thanks!!!

-- OpenShift
kubernetes
openshift
openshift-enterprise
openshift-origin

1 Answer

8/29/2017

You don't need to involve a route, you can use the service name directly to connect to it. The only caveat on that is that you need to (as admin), set up a pod network between the two projects. This is better as creating a route means it will also be exposed outside of the OpenShift cluster and so publicly accessible. You do not want that if these are internal services that you don't want exposed.

For details on pod networks see:

-- Graham Dumpleton
Source: StackOverflow