访问Kubernetes Web UI(仪表板) [英] Accessing Kubernetes Web UI (Dashboard)
问题描述
我已经安装了带有Kubeadm的Kubernetes工具,然后遵循文档安装Web UI(仪表板). Kubernetes已在一个节点实例(即污点主节点)中安装并运行.
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.
但是,我无法通过https://<kubernetes-master>/ui
访问Web UI.相反,我可以在https://<kubernetes-master>:6443/ui
上访问它.
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
.
我该如何解决?
推荐答案
您用来访问仪表板的URL是API服务器上的终结点.默认情况下,kubeadm
将API服务器部署在端口6443
上,而不是部署在443
上,这是需要通过https
访问仪表板而无需在URL中指定端口(即https://<kubernetes-master>/ui
)的API服务器
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 port443
by using the--api-port
flag exposed bykubeadm
. - Expose the dashboard using a service of type
NodePort
. - Deploy an ingress controller and define an ingress point for the dashboard.
这篇关于访问Kubernetes Web UI(仪表板)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!