简体   繁体   English

不能从外部访问kubernetes仪表板

[英]kubernetes dashboard is not accessible from outside

I have installed and configure Kubernates in my Ubuntu virtual machine 我已经在Ubuntu虚拟机中安装并配置了Kubernates

Reference: Document Link 参考: 文档链接

Started kubernetes proxy using below command 使用以下命令启动kubernetes代理

kubectl proxy --address='0.0.0.0'

I'm able to access my dashboard using http://localhost:8001 link on localhost when I'm trying to access the dashboard from outside using http://192.168.33.30:8001/ link getting following Error 当我尝试使用http://192.168.33.30:8001/链接从外部访问仪表板时,可以使用localhost上的http:// localhost:8001链接访问仪表板

<h3>Unauthorized</h3>

Can anyone help me on this? 谁可以帮我这个事?

It works using below command: 它可以使用以下命令进行工作:

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

After this, I am able to access the Kubernetes dashboard outside using VM IP address 之后,我可以使用VM IP地址访问外部的Kubernetes仪表板

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM