How to install Kubernetes dashboard on external IP address?

4/17/2018

How to install Kubernetes dashboard on external IP address? Is there any tutorial for this?

-- Anu V
kubernetes

1 Answer

4/17/2018

You can expose services and pods in several ways:

  • expose the internal ClusterIP service through Ingress, if you have that set up.
  • change the service type to use 'type: LoadBalancer', which will try to create an external load balancer.

If you have external IP addresses on your kubernetes nodes, you can also expose the ports directly on the node hosts; however, I would avoid these unless it's a small, test cluster.

  • change the service type to 'type: NodePort', which will utilize a port above 30000 on all cluster machines.
  • expose the pod directly using 'type: HostPort' in the pod spec.

Depending on your cluster type (Kops-created, GKE, EKS, AKS and so on), different variants may not be setup. Hosted clusters typically support and recommend LoadBalancers, which they charge for, but may or may not have support for NodePort/HostPort.

Another, more important note is that you must ensure you protect the dashboard. Running an unprotected dashboard is a sure way of getting your cluster compromised; this recently happened to Tesla. A decent writeup on various way to protect yourself was written by Jo Beda of Heptio

-- rln
Source: StackOverflow