<p>I am not able to access the nginx server using http://:30602 and also http://:30602</p>
<p><strong>OS: Ubuntu 22</strong></p>
<p>I also checked if any firewall is blocking it.</p>
<p><strong>Using ufw</strong></p>
<pre><code>admin@tst-server:~$ sudo ufw status verbose
Status: inactive
</code></pre>
<p><strong>Using netstat</strong></p>
<pre><code>admin@tst-server:~$ netstat -an | grep 22 | grep -i listen
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
tcp6       0      0 :::22                   :::*                    LISTEN
unix  2      [ ACC ]     STREAM     LISTENING     354787   /run/containerd/s/9a866c6ea3a4fe1976aaed0884400cd59228d43776774cc3fad2d0b9a7c2ed7b
unix  2      [ ACC ]     STREAM     LISTENING     21722    /run/systemd/private
admin@tst-server:~$ netstat -an | grep 30602 | grep -i listen
</code></pre>
<p>Commands used for nginx deployment</p>
<p><strong>Create Deployment</strong></p>
<pre><code>kubectl create deployment nginx --image=nginx
kubectl get deployments
NAME    READY   UP-TO-DATE   AVAILABLE   AGE
myapp   2/2     2            2           8d
nginx   1/1     1            1           9m50s
</code></pre>
<p><strong>Create Service</strong></p>
<pre><code>kubectl create service nodeport nginx --tcp=80:80
kubectl get svc
NAME         TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)        AGE
kubernetes   ClusterIP   10.96.0.1        &lt;none&gt;        443/TCP        8d
nginx        NodePort    10.109.112.116   &lt;none&gt;        80:30602/TCP   10m
</code></pre>
<p><strong>Test it out</strong></p>
<pre><code>admin@tst-server:~$ hostname
tst-server.com

admin@tst-server:~$ curl tst-server.com:30602
curl: (7) Failed to connect to tst-server.com port 30602 after 10 ms: Connection refused
</code></pre>

Nital
<p>Got it working by getting the Node IP address for Minikube using following command</p>
<pre><code>$ kubectl cluster-info
</code></pre>
<p>and then</p>
<pre><code>curl  http://&lt;node_ip&gt;:30008
</code></pre>
