title: Can't connect Kubernetes endpoints IPs with created as an headless service
body: <p>Created a headless service:</p>
  
  <p>myapp-service-headless.yaml</p>
  
  <pre><code>apiVersion: v1
  kind: Service
  metadata:
    name: myapp-service-headless
  spec:
    ports:
      - port: 8000
    selector:
      app: myapp
    clusterIP: None
  </code></pre>
  
  <p>After create it to Kubernetes cluster, check its service status:</p>
  
  <pre><code>$ kubectl create -f myapp-service-headless.yaml
  $ kubectl describe service myapp-service-headless
  Name:              myapp-service-headless
  Namespace:         default
  Labels:            &lt;none&gt;
  Annotations:       &lt;none&gt;
  Selector:          app=myapp
  Type:              ClusterIP
  IP:                None
  Port:              &lt;unset&gt;  8000/TCP
  TargetPort:        8000/TCP
  Endpoints:         172.17.0.11:8000,172.17.0.9:8000
  Session Affinity:  None
  Events:            &lt;none&gt;
  </code></pre>
  
  <p>Try to connect <code>172.17.0.11:8000</code> or <code>172.17.0.9:8000</code>, pending and no result.</p>
  
  <p>Here using <code>kube-dns</code>: <code>myapp-service-headless.default.svc.cluster.local</code> in the application. Now it's in the container of pods.</p>
  
  <p>So how to connect to these applications from other application via API? Which IP can been used?</p>