<p>In Openshift/kubernetes, how to create a service with pod selector that could discover pods across namespaces?</p>
<p>I tried to use the same label for all the pods in multiple namespaces and used that as pod selector in openshift 4.10 service but that did NOT work, i only see pods discovered by service from same namespace where it is created.</p>

Nagarjuna
<p>You can not.</p>
<p>By design, a Service is a namespace scoped object. When setting a selector, discovering Pods eligible to act as a backend for that Service, you would always stay within your namespace.</p>
<p>One way to have your Service pointing to something outside of your namespace would be to work without selectors. In your case, maybe an ExternalName could let you create one Service, making it an alias of another Service, in a remote namespace. <a href="https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types" rel="nofollow noreferrer">See Kubernetes docs</a></p>
