<p>I am running <strong>kubernetes single node on coreos</strong>. </p>

<p>I have created a pod running a python application and exposing an http endpoint.</p>

<p>I have created a kubernetes service that exposes the HTTP endpoint. I have exposed this service using NodePort and can call it successfully from outside the cluster.</p>

<p>What I am then trying is to call the HTTP service from a docker container. To test I am just using the same running container and using curl.  </p>

<p>I can <code>docker exec</code> into the docker container running my service.
nslookup for 'my-service' resolves to an IP address. So I am happy that <strong>DNS service registration is working correctly</strong>. (I have also checked that the ENV variables for the service exist - and they do and are the same as the value returned from <code>nslookup</code>) </p>

<p>However, if I then try:</p>

<pre><code>curl http://my-service:9042/status
</code></pre>

<p>It just hangs with no response. (Port 9042 is the correct port and status is a valid resource)</p>

<p>I'm assuming that I'm missing something really obvious. Any suggestions warmly received.</p>

<p>Update: </p>

<p>The response of curl -v is:</p>

<pre><code>root@lake-cluster-manager:/# curl -v http://lake-service:9042/status
* Hostname was NOT found in DNS cache
*   Trying 10.3.0.128...
</code></pre>

<p>The output from nslookup is:</p>

<pre><code>root@lake-cluster-manager:/# nslookup lake-service   
Server:     10.3.0.10
Address:    10.3.0.10#53

Name:   lake-service.default.svc.cluster.local
Address: 10.3.0.128
</code></pre>

<p>From the comments, it sounds like you got this to work.</p>

<p>Traffic to service IPs is forwarded via kube-proxy, either through a user-space proxy or through iptables rules, depending on the Kubernetes release version and configuration. You may want to look at the iptables rules for the node corresponding to that container to see if that could be the source of the problem.</p>
