无法从外部访问 kubernetes 仪表板

kubernetes dashboard is not accessible from outside

我已经在我的 Ubuntu 虚拟机中安装并配置了 Kubernates

参考:Document Link

使用以下命令启动了 kubernetes 代理

kubectl proxy --address='0.0.0.0'

我可以使用 http://localhost:8001 link on localhost when I'm trying to access the dashboard from outside using http://192.168.33.30:8001/ 访问我的仪表板 link 得到以下错误

<h3>Unauthorized</h3>

谁能帮我解决这个问题?

它使用以下命令工作:

kubectl proxy --address='0.0.0.0' --accept-hosts='^.*$' --port=8001

在此之后,我可以使用 VM IP 地址访问外部的 Kubernetes 仪表板