<pre><code>[root@kubemaster ~]# kubectl get pods -o wide
NAME                             READY   STATUS    RESTARTS   AGE   IP             NODE          NOMINATED NODE   READINESS GATES
pod1deployment-c8b9c74cb-hkxmq   1/1     Running   0          12s   192.168.90.1   kubeworker1   &lt;none&gt;           &lt;none&gt;

[root@kubemaster ~]# kubectl logs pod1deployment-c8b9c74cb-hkxmq
2020/05/16 23:29:56 Server listening on port 8080

[root@kubemaster ~]# kubectl get service -o wide
NAME          TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)   AGE   SELECTOR
kubernetes    ClusterIP   10.96.0.1        &lt;none&gt;        443/TCP   13m   &lt;none&gt;
pod1service   ClusterIP   10.101.174.159   &lt;none&gt;        80/TCP    16s   creator=sai
</code></pre>

<p>Curl on master node:</p>

<pre><code>[root@kubemaster ~]# curl -m 2 -v -s http://10.101.174.159:80
* About to connect() to 10.101.174.159 port 80 (#0)
*   Trying 10.101.174.159...
* Connection timed out after 2001 milliseconds
* Closing connection 0
</code></pre>

<p>Curl on worker node 1 is sucessfull for cluster IP ( this is the node where pod is running )</p>

<pre><code>[root@kubemaster ~]# ssh kubeworker1 curl -m 2 -v -s http://10.101.174.159:80
Hello, world!
Version: 1.0.0
Hostname: pod1deployment-c8b9c74cb-hkxmq
</code></pre>

<p>Curl fails on other worker node as well :  </p>

<pre><code>[root@kubemaster ~]# ssh kubeworker2 curl -m 2 -v -s http://10.101.174.159:80
* About to connect() to 10.101.174.159 port 80 (#0)
*   Trying 10.101.174.159...
* Connection timed out after 2001 milliseconds
* Closing connection 0
</code></pre>

confused genius
<p><strong>I was facing the same issue so this is what I did and it worked:</strong></p>
<p><strong>Brief:</strong> I am running 2 VMs for a 2 Node cluster. 1 Master Node and 1 Worker Node. A Deployment is running on the worker node. I wanted to curl from the master node so that I can get response from my application running inside a pod on the worker node. For that I deployed a service on the worker node which then exposed those set of pods inside the cluster.</p>
<p><strong>Issue:</strong> After deploying the service and doing <code>Kubectl get service</code>, it provided me with <code>ClusterIP</code> of that service and a port (BTW I used <code>NodePort</code> instead of Cluster IP when writing the service.yaml). But when curling on that IP address and port it was just hanging and then after sometime giving timeout.</p>
<p><strong>Solution:</strong> Then I tried to look at the hierarchy. First I need to contact the Node on which service is located then on the port given by the NodePort (i.e The one between 30000-32767) so first I did <code>Kubectl get nodes -o wide</code> to get the Internal IP address of the required Node (mine was 10.0.1.4) and then I did <code>kubectl get service -o wide</code> to get the port (the one between 30000-32767) and curled it. So my curl command was -&gt; <code>curl http://10.0.1.4:30669</code> and I was able to get the output.</p>
