<p>I have exposed my deployment to specific NodePort. If I want to connect to this deployment in cluster, how can I find the ip address of such NodePort?</p>

ccd
<p>You access NodePort service with <code>&lt;node-ip&gt;:&lt;node-port&gt;</code>.</p>

<h3>1. Check Node IP</h3>

<p>To check <code>node-ip</code>, you can execute the following command:</p>

<pre><code>$ kubectl get nodes -o wide
NAME                                                STATUS   ROLES    AGE     VERSION           INTERNAL-IP     EXTERNAL-IP     OS-IMAGE                             KERNEL-VERSION   CONTAINER-RUNTIME
gke-rafal-test-cluster-default-pool-ef8193e3-1450   Ready    &lt;none&gt;   6m47s   v1.13.11-gke.23   192.168.1.234   35.188.23.46    Container-Optimized OS from Google   4.14.138+        docker://18.9.7
gke-rafal-test-cluster-default-pool-ef8193e3-1bd4   Ready    &lt;none&gt;   6m47s   v1.13.11-gke.23   192.168.1.230   34.67.114.201   Container-Optimized OS from Google   4.14.138+        docker://18.9.7
gke-rafal-test-cluster-default-pool-ef8193e3-q3c4   Ready    &lt;none&gt;   6m47s   v1.13.11-gke.23   192.168.1.228   34.69.230.23    Container-Optimized OS from Google   4.14.138+        docker://18.9.7
</code></pre>

<p>Any of node <code>EXTERNAL-IP</code> will work, so you can use <code>35.188.23.46</code>, <code>4.67.114.201</code>, or <code>34.69.230.23</code>. It doesn't matter.</p>

<p>If you don't see any <code>EXTERNAL-IP</code>, it may mean that your Kubernetes nodes do not have external IPs, so you just can't access them from outside.</p>

<p>If you run minikube, you can check node ip with the <code>minikube ip</code> command. If you run Docker Desktop Kubernetes, then node ip is <code>localhost</code>.</p>

<h3>2. Check Node Port</h3>

<p>To check <code>node-port</code>, you can execute the following command.</p>

<pre><code>$ kubectl get svc
NAME                             TYPE           CLUSTER-IP     EXTERNAL-IP   PORT(S)                        AGE
my-release-hazelcast             NodePort       10.208.7.24    &lt;none&gt;        5701:31096/TCP                 4s
</code></pre>

<p>The <code>&lt;node-port&gt;</code> is <code>31096</code>.</p>
