<p>I have a service named <code>foo</code> with a selector to <code>foo</code> pod:</p>

<pre><code>apiVersion: v1
kind: Service
metadata:
  labels:
    name: foo
  name: foo
  namespace: bar
spec:
  clusterIP: 172.20.166.230
  ports:
  - port: 8080
    protocol: TCP
    targetPort: 8080
  selector:
    name: foo
  sessionAffinity: None
  type: ClusterIP
</code></pre>

<p>I have a deployment/pod named <code>foo</code> with a label <code>foo</code>:</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: "3"
  generation: 3
  labels:
    name: foo
  name: foo
  namespace: bar
spec:
  selector:
    matchLabels:
      name: foo
  template:
    metadata:
      labels:
        name: foo
    spec:
      containers:
        image: my/image:tag
        imagePullPolicy: Always
        name: foo
        ports:
        - containerPort: 8080
          protocol: TCP
      dnsPolicy: ClusterFirst
</code></pre>

<p>I make a request from <code>foo</code> pod to <code>foo</code> host, host resolved but requests just don't pass through:</p>

<pre><code>$ curl -vvv foo:8080
* Rebuilt URL to: foo:8080/
*   Trying 172.20.166.230...
* TCP_NODELAY set
</code></pre>

<p>Is this supposed to work like that in Kubernetes?</p>

<p>I don't have any problems requesting <code>foo</code> from other pods from the same namespace.</p>

<p>The reason why I don't simply use <code>localhost:8080</code> (which works fine) is that I have the same config file with hosts used by different pods, so I don't want to write a specific logic per pod.</p>

<p>Kubernetes 1.6.4, single-node cluster, iptables mode.</p>

<p>It looks like this is a default behavior when using iptables as a proxy mode.</p>
