<p>We have multi-node cluster setup, now try to install dashboard.</p>
<p>I ran command <code>kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.4.0/aio/deploy/recommended.yaml </code> and it deploy all resource.</p>
<p>I check the service is created.</p>
<pre><code># kubectl get services -n kubernetes-dashboard
NAME                        TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)    AGE
dashboard-metrics-scraper   ClusterIP   10.103.75.109    &lt;none&gt;        8000/TCP   4m53s
kubernetes-dashboard        ClusterIP   10.106.194.108   &lt;none&gt;        443/TCP    4m53s
</code></pre>
<p>Then try to access the service url.</p>
<pre><code># curl https://10.106.194.108 -k
&lt;!--
Copyright 2017 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--&gt;&lt;!DOCTYPE html&gt;&lt;html lang=&quot;en&quot;&gt;&lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;title&gt;Kubernetes Dashboard&lt;/title&gt;
  &lt;link rel=&quot;icon&quot; type=&quot;image/png&quot; href=&quot;assets/images/kubernetes-logo.png&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width&quot;&gt;
&lt;style&gt;body,html{height:100%;margin:0;}&lt;/style&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;styles.aa0538c9a91ebbb04705.css&quot; media=&quot;print&quot; onload=&quot;this.media='all'&quot;&gt;&lt;noscript&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;styles.aa0538c9a91ebbb04705.css&quot;&gt;&lt;/noscript&gt;&lt;/head&gt;

&lt;body&gt;
  &lt;kd-root&gt;&lt;/kd-root&gt;
&lt;script src=&quot;runtime.1a20bc8321eb559541a1.js&quot; defer&gt;&lt;/script&gt;&lt;script src=&quot;polyfills.2565916e4afd13edaa84.js&quot; defer&gt;&lt;/sc
  creationTimestamp: &quot;2021-11-09T21:20:14Z&quot;
ript&gt;&lt;script src=&quot;scripts.f76573725d49abb057d3.js&quot; defer&gt;&lt;/script&gt;&lt;script src=&quot;en.main.7f7baee1f12d075d7cb9.js&quot; defer&gt;&lt;/script&gt;


&lt;/body&gt;&lt;/html&gt;
</code></pre>
<p>Then I follow the steps to convert <code>ClusterIP</code> to <code>NodePort</code>,</p>
<p>Service before conversion.</p>
<pre><code># kubectl -n kubernetes-dashboard describe service kubernetes-dashboard
Name:              kubernetes-dashboard
Namespace:         kubernetes-dashboard
Labels:            k8s-app=kubernetes-dashboard
Annotations:       &lt;none&gt;
Selector:          k8s-app=kubernetes-dashboard
Type:              ClusterIP
IP Family Policy:  SingleStack
IP Families:       IPv4
IP:                10.106.194.108
IPs:               10.106.194.108
Port:              &lt;unset&gt;  443/TCP
TargetPort:        8443/TCP
Endpoints:         192.168.211.130:8443
Session Affinity:  None
Events:            &lt;none&gt;
</code></pre>
<p>Service after edit using <code>kubectl -n kubernetes-dashboard edit service kubernetes-dashboard</code> command.</p>
<pre><code># kubectl -n kubernetes-dashboard describe service kubernetes-dashboard
Name:                     kubernetes-dashboard
Namespace:                kubernetes-dashboard
Labels:                   k8s-app=kubernetes-dashboard
Annotations:              &lt;none&gt;
Selector:                 k8s-app=kubernetes-dashboard
Type:                     NodePort
IP Family Policy:         SingleStack
IP Families:              IPv4
IP:                       10.106.194.108
IPs:                      10.106.194.108
Port:                     &lt;unset&gt;  443/TCP
TargetPort:               8443/TCP
NodePort:                 &lt;unset&gt;  32358/TCP
Endpoints:                192.168.211.130:8443
Session Affinity:         None
External Traffic Policy:  Cluster
Events:                   &lt;none&gt;
</code></pre>
<p>then <code>curl https://10.106.194.108:32358 -k</code> never return data :(.</p>
<p>I check the pod IP, and its working.</p>
<pre><code># curl https://192.168.211.130:8443 -k
&lt;!--
Copyright 2017 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--&gt;&lt;!DOCTYPE html&gt;&lt;html lang=&quot;en&quot;&gt;&lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;title&gt;Kubernetes Dashboard&lt;/title&gt;
  &lt;link rel=&quot;icon&quot; type=&quot;image/png&quot; href=&quot;assets/images/kubernetes-logo.png&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width&quot;&gt;
&lt;style&gt;body,html{height:100%;margin:0;}&lt;/style&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;styles.aa0538c9a91ebbb04705.css&quot; media=&quot;print&quot; onload=&quot;this.media='all'&quot;&gt;&lt;noscript&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;styles.aa0538c9a91ebbb04705.css&quot;&gt;&lt;/noscript&gt;&lt;/head&gt;

&lt;body&gt;
  &lt;kd-root&gt;&lt;/kd-root&gt;
&lt;script src=&quot;runtime.1a20bc8321eb559541a1.js&quot; defer&gt;&lt;/script&gt;&lt;script src=&quot;polyfills.2565916e4afd13edaa84.js&quot; defer&gt;&lt;/script&gt;&lt;script src=&quot;scripts.f76573725d49abb057d3.js&quot; defer&gt;&lt;/script&gt;&lt;script src=&quot;en.main.7f7baee1f12d075d7cb9.js&quot; defer&gt;&lt;/script&gt;


&lt;/body&gt;&lt;/html&gt;
</code></pre>
<p>How to check why its not working after changing to <code>NodePort</code> ?</p>

Nilesh
<p>k8s nodeport service works like this :</p>
<p>which means your valid endpoint would be</p>
<pre><code>http://{NODE_IP}:{PORT}
</code></pre>
<p><a href="https://i.stack.imgur.com/3wepF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3wepF.png" alt="enter image description here" /></a></p>
