简体   繁体   English

Docker 对于 Windows CE:Kube.netes:无法连接到服务器 eof

[英]Docker For Windows CE: Kubernetes: Unable to connect to the server eof

I simply cannot find a solution for this " Unable to connect to the server eof", hopefully we solve this and it helps somebody in future, when searching to fix this issue.我根本找不到这个“无法连接到服务器eof”的解决方案,希望我们能解决这个问题,它可以帮助将来的人搜索解决这个问题。 I tried to include all information in the screenshot.我试图在屏幕截图中包含所有信息。 Let me know if more information is required.让我知道是否需要更多信息。

I have tried to add the information requested, let me know if theres anything else you need or want me to try.我已尝试添加所要求的信息,如果您还需要或希望我尝试任何其他信息,请告诉我。

命令信息

更多信息

Please try to get into logs of kube-dns docker container directly as below: 请尝试直接进入kube-dns docker容器的日志,如下所示:

  1. Enable 'Show system containers' option in Docker Desktop settings: 在Docker桌面设置中启用``显示系统容器''选项: 在此处输入图片说明
  2. Check if kube-dns container was ever run: 检查kube-dns容器是否曾经运行过:

docker ps -a --filter name=k8s_kubedns_kube-dns --format "table {{.ID}}\\t{{.Image}}" docker ps -a --filter name = k8s_kubedns_kube-dns --format“ table {{.ID}} \\ t {{。Image}}”

You should see similar command output to this: 您应该看到与此类似的命令输出:

CONTAINER ID IMAGE 集装箱ID图像
9009731e183d 80cc5ea4b547 9009731e183d 80cc5ea4b547

  1. Get kube-dns container logs with: 使用以下命令获取kube-dns容器日志:

docker logs {your_container_id} --tail 100 码头工人日志{your_container_id} --tail 100

I had this error (with Docker Desktop on Windows 11, using wsl2), and the solution for me was to use the Settings page (in DD), then choose "Kube.netes" on the left, then chose "reset kube.netes cluster".我有这个错误(Docker 桌面在 Windows 11,使用 wsl2),我的解决方案是使用设置页面(在 DD 中),然后选择左侧的“Kube.netes”,然后选择“reset kube.netes”簇”。 That warned that all stacks and k8s resources would be deleted, but as nothing else had worked for me (and I wasn't worry about losing much), I tried it, and it did solve the problem.这警告说所有堆栈和 k8s 资源都将被删除,但由于没有其他方法对我有用(而且我不担心损失太多),我尝试了一下,它确实解决了问题。

FWIW, k8s had been working fine for me for some time. FWIW,k8s 已经为我工作了一段时间。 It was just that one day I found I was getting this error.只是有一天我发现我遇到了这个错误。 I searched and searched and found lots of folks asking about it but not getting answers, let alone this answer (even here).我搜了又搜,发现很多人都在问这个问题,但没有得到答案,更不用说这个答案了(甚至在这里)。 To be clear, I had tried restarting Docker Desktop, restarting the host machine, even downloading and installing an available DD update (I was only a bit behind), and nothing worked.需要明确的是,我曾尝试重新启动 Docker Desktop,重新启动主机,甚至下载并安装可用的 DD 更新(我只是落后了一点),但没有任何效果。 But the reset did.但是重置确实如此。

I realize some may fear losing something, but again it worked and was worth it for me.我意识到有些人可能害怕失去一些东西,但它再次起作用并且对我来说是值得的。 Hope that may help others.希望可以帮助别人。

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

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