<p>I have got the following service for Kubernetes dashboard</p>

<pre><code>Name:               kubernetes-dashboard
Namespace:          kube-system
Labels:             k8s-app=kubernetes-dashboard
                    kubernetes.io/cluster-service=true
Annotations:        kubectl.kubernetes.io/last-applied-configuration={"kind":"Service","apiVersion":"v1","metadata":{"name":"kubernetes-dashboard","namespace":"kube-system","creationTimestamp":null,"labels":{"k8s-app":"k...
Selector:           k8s-app=kubernetes-dashboard
Type:               NodePort
IP:                 10.0.106.144
Port:               &lt;unset&gt; 80/TCP
NodePort:           &lt;unset&gt; 30177/TCP
Endpoints:          10.244.0.11:9090
Session Affinity:   None
Events:             &lt;none&gt;
</code></pre>

<p>According to the <a href="https://learn.microsoft.com/en-us/azure/container-service/container-service-kubernetes-ui" rel="nofollow noreferrer">documentation</a>, I ran</p>

<pre><code>az acs kubernetes browse
</code></pre>

<p>and it works on <a href="http://localhost:8001/ui" rel="nofollow noreferrer">http://localhost:8001/ui</a></p>

<p>But I want to access it outside the cluster too. The describe output says that it is exposed using NodePort on port 30177. </p>

<p>But I'm not able to access it on <code>http://&lt;any node IP&gt;:30177</code></p>

<p>As we know, expose the service to internet, we can use <code>nodeport</code> and <code>LoadBalancer</code>.</p>
<p>As far as I know, Azure does <strong>not</strong> support nodeport type now.</p>
<blockquote>
<p>But I want to access it outside the cluster too.</p>
</blockquote>
<p>we can use <code>LoadBalancer</code> to re-create the kubernetes dashboard, here are my steps:</p>
<ol>
<li><p><strong>Delete</strong> kubernetes-dashboard via kubernetes UI: select <strong>Namespace</strong> to <strong>kube-system</strong>, then select <strong>services</strong>, then delete it:
<a href="https://i.stack.imgur.com/DlO9j.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DlO9j.png" alt="enter image description here" /></a>
<a href="https://i.stack.imgur.com/wjJLI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wjJLI.png" alt="enter image description here" /></a></p>
</li>
<li><p>Modify Kubernetes-dashboard-service.yaml: SSH master VM, then <strong>change</strong> type from nodeport to <strong>LoadBalancer</strong>:</p>
<p>root@k8s-master-47CAB7F6-0:/etc/kubernetes/addons# vi kubernetes-dashboard-service.yaml</p>
<pre><code> apiVersion: v1
 kind: Service
 metadata:
   labels:
     kubernetes.io/cluster-service: &quot;true&quot;
     k8s-app: kubernetes-dashboard
   name: kubernetes-dashboard
   namespace: kube-system
 spec:
   ports:
   - port: 80
     targetPort: 9090
   selector:
     k8s-app: kubernetes-dashboard
   type: LoadBalancer
</code></pre>
</li>
<li><p><strong>start</strong> kubernetes browse from CLI 2.0:</p>
<p>C:\Users&gt;<code>az acs kubernetes browse -g k8s -n containerservice-k8s</code></p>
</li>
</ol>
<p>Then SSH to master VM to <strong>check the status</strong>:
<a href="https://i.stack.imgur.com/UUcQE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UUcQE.png" alt="enter image description here" /></a></p>
<p>Now, we can via the Public IP address to browse the UI:</p>
<p><a href="https://i.stack.imgur.com/OD3eB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OD3eB.png" alt="enter image description here" /></a>
<strong>Update</strong>:<br />
The following image shows the architecture of azure container service cluster(Kubernetes), we should use Load-Balancer to expose the service to internet.</p>
<p><a href="https://i.stack.imgur.com/pgz6R.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pgz6R.png" alt="enter image description here" /></a></p>
