<p>I have a single-master kubeadm cluster setup with 3 nodes (2 workers).
I can access the kubernetes-dashboard trough kubectl proxy on my local computer until I enable my firewall.
My firewall(ufw) config is:
<strong>master-node</strong></p>
<pre><code>Status: active

To                         Action      From
--                         ------      ----
22/tcp                     ALLOW       Anywhere                  
6443/tcp                   ALLOW       Anywhere                  
2379:2380/tcp              ALLOW       Anywhere                  
10250/tcp                  ALLOW       Anywhere                  
10251/tcp                  ALLOW       Anywhere                  
10252/tcp                  ALLOW       Anywhere                  
10255/tcp                  ALLOW       Anywhere                  
80/tcp                     ALLOW       Anywhere                  
443/tcp                    ALLOW       Anywhere                  
8443/tcp                   ALLOW       Anywhere                  
22/tcp (v6)                ALLOW       Anywhere (v6)             
6443/tcp (v6)              ALLOW       Anywhere (v6)             
2379:2380/tcp (v6)         ALLOW       Anywhere (v6)             
10250/tcp (v6)             ALLOW       Anywhere (v6)             
10251/tcp (v6)             ALLOW       Anywhere (v6)             
10252/tcp (v6)             ALLOW       Anywhere (v6)             
10255/tcp (v6)             ALLOW       Anywhere (v6)             
80/tcp (v6)                ALLOW       Anywhere (v6)             
443/tcp (v6)               ALLOW       Anywhere (v6)             
8443/tcp (v6)              ALLOW       Anywhere (v6)  
</code></pre>
<p><strong>worker-nodes</strong></p>
<pre><code>Status: active

To                         Action      From
--                         ------      ----
10250/tcp                  ALLOW       Anywhere                  
10255/tcp                  ALLOW       Anywhere                  
30000:32767/tcp            ALLOW       Anywhere                  
22/tcp                     ALLOW       Anywhere                  
10250/tcp (v6)             ALLOW       Anywhere (v6)             
10255/tcp (v6)             ALLOW       Anywhere (v6)             
30000:32767/tcp (v6)       ALLOW       Anywhere (v6)             
22/tcp (v6)                ALLOW       Anywhere (v6) 
</code></pre>
<p>Is there a port I forgot to allow? or could it come from something else?</p>
<p>Thanks!</p>

Antoine Coulon
<p>In order to access the dashboard, you need to have a Kubernetes <code>Service</code> expose the dashboard.  Assuming you have it installed using the instructions <a href="https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/" rel="nofollow noreferrer">here</a>, you can patch the service to expose the port as a <a href="https://kubernetes.io/docs/concepts/services-networking/service/#nodeport" rel="nofollow noreferrer"><code>NodePort</code></a>.</p>
<p><code>kubectl patch service/kubernetes-dashboard -p '{&quot;spec&quot;:{&quot;type&quot;:&quot;NodePort&quot;}}' --type=merge</code></p>
<p>Then run this command which will return the NodePort number:</p>
<p><code>kubectl get service/kubernetes-dashboard -o jsonpath='{.spec.ports[0].nodePort}'</code></p>
<p>Then update your firewall to open that port on one or all of your workers.</p>
<p>Then hit that port on any worker: <code>https://[WorkerIP]:[NodePort]</code></p>
