<p>I need to connect between pod-1 and pod-2 in the same namespace. I want to test mutlicast using <code>netcat</code>.</p>
<p>I tried to listen on one pod and connect to that from the other pod using the pod-1 IP but that doesn't work. I even tried tomcat7.test-web-dev and that doesn't work either. Ping doesn't respond either.</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: tomcat7
  namespace: test-web-dev
spec:
  selector:
    app: tomcat7 # Metadata label of the deployemnt pod template or pod metadata label
  ports:
    - name: port-1234 
      protocol: TCP
      port: 1234
      targetPort: 1234
    - name: port-1234 
      protocol: UDP
      port: 1234
      targetPort: 1234
</code></pre>

user630702
<p>try connecting to:</p>
<pre><code>&lt;clusterip&gt;.&lt;namespace&gt;.pod.cluster.local
</code></pre>
<p>or</p>
<pre><code>&lt;clusterip&gt;.&lt;namespace&gt;.svc.cluster.local
</code></pre>
<p>but yes, in general, it is a pain to setup these things depending on your k8s deployment.</p>
<p>You can also enter the client pod using kubectl and try pinging the server one on different addresses until success.</p>
<pre><code>kubectl exec --stdin --tty &lt;client-pod-name&gt; -- /bin/bash
</code></pre>
