Kubernets的DashBoard安装出现telnet connection refused的问题

Kubernetes官网上面的DashBoard安装是很简单的。问题是花了一天时间还没有搞完

kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v1.10.1/src/deploy/recommended/kubernetes-dashboard.yaml
  
  
   
   kubectl proxy
  
  

当kubectl proxy启动后,奇怪是telnet localhost 8001是通的。 但是外网telnet x.x.x.x 8001,connection refused

一开始还以为是防火墙的原因。后面把防火墙关了,还是一样的。

后面花了很长时间,原来是

netstat –anpt 显示

TSLOR6@LHA})L2U8](B6W[W

Local Address是 127.0.0.1:8001可以访问。

所有启动kubectl proxy用下面:

kubectl proxy --address='0.0.0.0' --accept-hosts='^*$'&

说明:

--address='0.0.0.0': 让Local Address变成:::8001,所有ip都可以访问。

--accept-hosts='^*$': 让所有ip可以访问,不加这个会出现Forbidden。

&:后台运行


最后,终于出现这个界面了

[]ZI3@UD_J0%HDEBWL[THCA



参考:

1)https://github.com/kubernetes/dashboard

2)https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/

3)https://www.cnblogs.com/lemon-flm/p/7396536.html

猜你喜欢

转载自www.cnblogs.com/cay914/p/10371439.html