<p>Is there any way to setup cross communication with different namespace, say pods of <code>namespace-a</code> to communicate pods of <code>namespace-b</code> with each other in GKE cluster except for setting network policies?</p>

<p>Networking within a Kubernetes cluster can be done in different ways, but the recommended and most common way is to use DNS names. Pods get their own DNS names, but it is recommended that you access another app in the cluster via the <a href="https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/#dns" rel="noreferrer">DNS name for the Service</a>.</p>
<p><a href="https://kubernetes.io/docs/tasks/administer-cluster/namespaces/#understanding-namespaces-and-dns" rel="noreferrer">DNS names are hierarchical</a>, starting with the Service name, and then the Namespace name.</p>
<ul>
<li><p>To access another app in the same namespace, use <code>&lt;other-app-service-name&gt;</code>, e.g. <code>http://&lt;other-app-service-name&gt;</code>.</p>
</li>
<li><p>To send a request to an app in a different namespace, also use the namepspace part of the domain name, <code>&lt;another-app-service-name&gt;.&lt;other-namespace-name&gt;</code>, e.g. <code>http://&lt;another-app-service-name&gt;.&lt;other-namespace-name&gt;</code></p>
</li>
</ul>
