title: Kubernetes: How to allow two pods running in same/different namespace communicate irrespective of the protocol using a servicename?
body: <p>Allow two pods (say pod A and B) running in same/different namespace communicate irrespective of the protocol(say http,https,akka.tcp) along with a valid Network policy applied.</p>
  
  <p><strong><em>Solutions tried:</em></strong></p>
  
  <ol>
  <li><p>Tried applying network policy to both the pods and also used the service name: “my-svc.my-namespace.svc.cluster.local” to make pod B
  communicate to pod A which is running the service “my-svc” but both
  failed to communicate.</p></li>
  <li><p>Also tried adding the IP address and host mapping of pod A in pod B while it’s deployment, then pod B was able to communicate to pod A
  but inverse communication is failing.</p></li>
  </ol>
  
  <p>Kindly suggest me a way to fix this.</p>