无法连接到服务器:kubernetes 中的 eof
我已遵循本教程 创建一个 2 主 2 负载均衡器 1 工作者 kubernetes 集群,一切似乎都工作正常,我的仪表板正在运行。直到我尝试测试高可用性并关闭两个主服务器之一,然后我只有在尝试任何 kubectl 命令时才会得到
无法连接到服务器:EOF
知道出了什么问题吗?
我使用 ubuntu 20.04 作为主操作系统,并且还使用 ubuntu 20.04 作为我的虚拟机
I have followed this tutorial to create a 2 master 2 load balancer 1 worker kubernetes cluster, everything seemed to be working fine and I got my dashboard running. Up until I was trying to test the high availability and shut down one of the two masters, then I only get when I try any kubectl command
Unable to connect to the server: EOF
Any idea what's wrong?
I am using ubuntu 20.04 as the main OS, and also ubuntu 20.04 for my VMs
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不知道你的问题是否已经解决了。
我以前也遇到过这样的问题。当我检查这个问题时,它与我所使用的操作系统的防火墙设置有关。
当我重新启动服务器时,我的 iptables 规则过滤器被清除,因此 Kubernetes 所需的端口无法访问。
作为解决方法,我找到了“iptables-persistent”包,并使用命令“sudo su”/sbin/iptables-save > 在 Ubuntu 中永久保存了我的规则。 /etc/iptables/rules.v4"。
应用此解决方案后,当我重新启动服务器时,我的规则现在永久有效。
I don't know if you have already fixed your problem.
I've had a problem like this before. When I examined the problem, it was related to the firewall settings of the operating system I was using.
When I rebooted the server, my iptables rule filters were cleared, so the ports Kubernetes needed were not accessible.
As a workaround, I found the "iptables-persistent" package and saved my rules permanently in Ubuntu using the command "sudo su "/sbin/iptables-save > /etc/iptables/rules.v4".
After this solution I applied, when I rebooted the server, my rules were now permanently effective.