OpenShift access service in other namespace without network join

1/30/2019

I'm new to OpenShift. I have two projects|namespaces. In each I have a rest service. What I want is service from NS1 access service from NS2 without joining projects networks. Also SDN with multi tenant plugin.

I found example on how to add external services to cluster as native. In NS1 I created an Endpoint for external IP of Service form NS2, but when I tried to create a Service in NS1 for this Endpoint, it failed cause there was no type tag (which wasn't in example also).

I also tried ExternalName. For externalName key my value was URL of router to service in NS2. But it doesn't work pretty well, cause it always returns me a page with Application is not available. But app\service works.

-- Vito Karleone
envoyproxy
istio
kubernetes
openshift

1 Answer

1/30/2019

Services in different namespaces are not external, but local to the cluster. So you simply access the services using DNS:

for example: servicename.svc.cluster.local or simply servicename.svc

see also https://docs.openshift.com/enterprise/3.0/architecture/additional_concepts/networking.html

-- Markus Dresch
Source: StackOverflow