<p>Team,</p>

<p>Currently we have setup a kubernetes cluster with a single master and single worker node.</p>

<pre><code>[root@k8s-master ~]# kubectl get nodes
NAME                                           STATUS   ROLES    AGE   VERSION
ip-172-31-18-129.ap-south-1.compute.internal   Ready    &lt;none&gt;   15h   v1.15.0
k8s-master                                     Ready    master   15h   v1.15.0

[root@k8s-master ~]# kubectl get svc
NAME         TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE
kubernetes   ClusterIP   10.96.0.1       &lt;none&gt;        443/TCP        15h
nodeport     NodePort    10.104.192.11   &lt;none&gt;        80:30385/TCP   4s

[root@k8s-master ~]# kubectl get pod -o wide
NAME                     READY   STATUS    RESTARTS   AGE   IP          NODE                                           NOMINATED NODE   READINESS GATES
nginx-554b9c67f9-wcsds   1/1     Running   1          15h   10.44.0.1   ip-172-31-18-129.ap-south-1.compute.internal   &lt;none&gt;           &lt;none&gt;
[root@k8s-master ~]# curl -v 172.31.18.129:30385
* Rebuilt URL to: 172.31.18.129:30385/
*   Trying 172.31.18.129...
* TCP_NODELAY set
</code></pre>

<p>Here am using my worker node ip to access my container from master. Whereas I can able to access from worker node by cluster ip, please find the output below :</p>

<pre><code>[root@ip-172-31-18-129 ~]# curl 10.104.192.11
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Welcome to nginx!&lt;/title&gt;
&lt;style&gt;
    body {
        width: 35em;
        margin: 0 auto;
        font-family: Tahoma, Verdana, Arial, sans-serif;
    }
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Welcome to nginx!&lt;/h1&gt;
&lt;p&gt;If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.&lt;/p&gt;

&lt;p&gt;For online documentation and support please refer to
&lt;a href="http://nginx.org/"&gt;nginx.org&lt;/a&gt;.&lt;br/&gt;
Commercial support is available at
&lt;a href="http://nginx.com/"&gt;nginx.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Thank you for using nginx.&lt;/em&gt;&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>What I expected to happen?</p>

<p>Nginx container suppose to be accessible from master using worker node ip address, but am unable to do that for some reason.</p>

<p>Kubernetes version (use kubectl version):</p>

<pre><code>[root@k8s-master ~]# kubectl version
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.0", GitCommit:"e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529", GitTreeState:"clean", BuildDate:"2019-06-19T16:40:16Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.0", GitCommit:"e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529", GitTreeState:"clean", BuildDate:"2019-06-19T16:32:14Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}

[root@k8s-master ~]# kubeadm version
kubeadm version: &amp;version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.0", GitCommit:"e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529", GitTreeState:"clean", BuildDate:"2019-06-19T16:37:41Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}

Cloud provider or hardware configuration: AWS EC2 instances

OS (e.g: cat /etc/os-release): RHEL 8
Kernel (e.g. uname -a):
[root@k8s-master ~]# uname -a
Linux k8s-master 4.18.0-80.4.2.el8_0.x86_64 #1 SMP Fri Jun 14 13:20:24 UTC 2019 x86_64 x86_64 x86_64 GNU/L
</code></pre>

<p>Any help is appreciated.
Thanks in advance !!!</p>

Vennila K
<p>Check the link below. Since you have hosted your worker node in the cloud environment, you need to achieve this through Ingress resource</p>

<p><a href="https://serverfault.com/questions/946546/how-to-externally-access-a-kubernetes-service-of-type-as-nodeport-using-ec2-p">https://serverfault.com/questions/946546/how-to-externally-access-a-kubernetes-service-of-type-as-nodeport-using-ec2-p</a></p>
