Accessing Kubernetes Web UI (Dashboard)

2020-04-23 07:23发布

I have installed a Kubernetes with Kubeadm tool, and then followed the documentation to install the Web UI (Dashboard). Kubernetes is installed and running in one node instance which is a taint master node.

However, I'm not able to access the Web UI at https://<kubernetes-master>/ui. Instead I can access it on https://<kubernetes-master>:6443/ui.

How could I fix this?

1条回答
▲ chillily
2楼-- · 2020-04-23 07:48

The URL you are using to access the dashboard is an endpoint on the API Server. By default, kubeadm deploys the API server on port 6443, and not on 443, which is what you would need to access the dashboard through https without specifying a port in the URL (i.e. https://<kubernetes-master>/ui)

There are various ways you can expose and access the dashboard. These are ordered by increasing complexity:

  • If this is a dev/test cluster, you could try making kubeadm deploy the API server on port 443 by using the --api-port flag exposed by kubeadm.
  • Expose the dashboard using a service of type NodePort.
  • Deploy an ingress controller and define an ingress point for the dashboard.
查看更多
登录 后发表回答