<p><strong>Kubernetes version:</strong>
v1.10.3</p>

<p><strong>Docker version:</strong>
17.03.2-ce</p>

<p><strong>Operating system and kernel:</strong>
Centos 7</p>

<p><strong>Steps to Reproduce:</strong>
<a href="https://kubernetes.io/docs/tasks/access-application-cluster/service-access-application-cluster/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/access-application-cluster/service-access-application-cluster/</a></p>

<p><strong>Results:</strong></p>

<p>[root@rd07 rd]# kubectl describe services example-service</p>

<p>Name:                     example-service<br>
Namespace:                default<br>
Labels:                   run=load-balancer-example<br>
Annotations:              <br>
Selector:                 run=load-balancer-example<br>
Type:                     NodePort<br>
IP:                       10.108.214.162<br>
Port:                       9090/TCP<br>
TargetPort:               9090/TCP<br>
NodePort:                   31105/TCP<br>
Endpoints:                192.168.1.23:9090,192.168.1.24:9090<br>
Session Affinity:         None<br>
External Traffic Policy:  Cluster<br>
Events:                   <br></p>

<p><strong>Expected:</strong></p>

<p>Expect to be able to curl the cluster ip defined in the kubernetes service</p>

<p>I'm not exactly sure which is the so called "public-node-ip", so I tried every related ip address, only when using the master ip as the "public-node-ip" it shows "No route to host".</p>

<p>I used "netstat" to check if the endpoint is listened.</p>

<p>I tried "<a href="https://github.com/rancher/rancher/issues/6139" rel="nofollow noreferrer">https://github.com/rancher/rancher/issues/6139</a>" to flush my iptables, and it was not working at all.</p>

<p>I tried "<a href="https://kubernetes.io/docs/tasks/debug-application-cluster/debug-service/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/debug-application-cluster/debug-service/</a>",  "nslookup hostnames.default" is not working.</p>

<p>The services seems working perfectly fine, but the services still cannot be accessed.</p>

<p>I'm using "calico" and the "flannel" was also tried.</p>

<p>I tried so many tutorials of apply services, they all cannot be accessed.</p>

<p>I'm new to kubernetes, plz if anyone could help me.</p>

Yiliu
<p>If you are on any public cloud you are not supposed to get public ip address at <code>ip a</code> command. But even though the port will be exposed to <code>0.0.0.0:31105</code> </p>

<p>Here is the sample file you can verify for your configuration:</p>

<pre><code>apiVersion: v1
kind: Service
metadata:
  labels:
    k8s-app: app-name
  name: bss
  namespace: default
spec:
  externalIPs:
  - 172.16.2.2
  - 172.16.2.3
  - 172.16.2.4
  externalTrafficPolicy: Cluster
  ports:
  - port: 9090
    protocol: TCP
    targetPort: 9090
  selector:
    k8s-app: bss
  sessionAffinity: ClientIP
  type: LoadBalancer
status:
  loadBalancer: {}
</code></pre>

<p>Just replace your <code>&lt;private-ip&gt;</code> at <code>externalIPs:</code> and do curl your public ip with your node port.</p>

<p>If you are using any cloud to deploy application, Also verify configuration from cloud security groups/firewall for opening port.</p>

<p>Hope this may help.</p>

<p>Thank you! </p>
