title: Access pod localhost from Service
body: <p>New to Kubernetes. </p>
  
  <p>I have a private dockerhub image deployed on a Kubernetes instance. When I exec into the pod I can run the following so I know my docker image is running:</p>
  
  <pre class="lang-sh prettyprint-override"><code>root@private-reg:/# curl 127.0.0.1:8085
  Hello world!root@private-reg:/# 
  </code></pre>
  
  <p>From the dashboard I can see my service has an external endpoint which ends with port 8085. When I try to load this I get 404. My service YAML is as below:</p>
  
  <pre><code>{
    "kind": "Service",
    "apiVersion": "v1",
    "metadata": {
      "name": "test",
      "namespace": "default",
      "selfLink": "/api/v1/namespaces/default/services/test",
      "uid": "a1a2ae23-339b-11e9-a3db-ae0f8069b739",
      "resourceVersion": "3297377",
      "creationTimestamp": "2019-02-18T16:38:33Z",
      "labels": {
        "k8s-app": "test"
      }
    },
    "spec": {
      "ports": [
        {
          "name": "tcp-8085-8085-7vzsb",
          "protocol": "TCP",
          "port": 8085,
          "targetPort": 8085,
          "nodePort": 31859
        }
      ],
      "selector": {
        "k8s-app": "test"
      },
      "clusterIP": "******",
      "type": "LoadBalancer",
      "sessionAffinity": "None",
      "externalTrafficPolicy": "Cluster"
    },
    "status": {
      "loadBalancer": {
        "ingress": [
          {
            "ip": "******"
          }
        ]
      }
    }
  }
  </code></pre>
  
  <p>Can anyone point me in the right direction.</p>