首页 > 其他分享 >docker desktop k8s错误Unable to connect to the server: EOF

docker desktop k8s错误Unable to connect to the server: EOF

时间:2023-03-30 20:15:19浏览次数:39  
标签:Unable EOF kubernetes desktop internal docker server

问题

当使用 Docker Desktop 开启 Kubernetes 之后,在终端执行命令 kubectl get nodes 时,出现以下错误:

Unable to connect to the server: EOF

根因分析

终端执行命令 kubectl cluster-info,输出如下:

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
error: Get "https://kubernetes.docker.internal:6443/api?timeout=32s": net/http: TLS handshake timeout - error from a previous attempt: EOF

说明现在没法访问到 kubernetes.docker.internal,查看一下本机 hosts 文件发现新增了以下配置:

# Added by Docker Desktop
# To allow the same kube context to work on the host and the container:
127.0.0.1 kubernetes.docker.internal

这个时候问题就显而易见了,由于我本机 Shell 使用了 proxy 配置,而代理没有忽略 Docker 的这个特殊域名。

解决方案

kubernetes.docker.internal 添加到 NO_PROXY 环境变量中。

image


image

标签:Unable,EOF,kubernetes,desktop,internal,docker,server
From: https://www.cnblogs.com/fengyinxu/p/docker-desktop-k8s-error-unable-to-connect-to-the-serv

相关文章

  • PageOffice 在线编辑 office文件,回调父页面
    一、子页面调用父页面的方法varvalue=window.external.CallParentFunc("ParentFunName(Arguments);");//父页面的JS函数有返回值window.external.CallParentFunc("ParentFunName(Arguments);");//父页面的JS函数无返回值二、是否需要传递参数(子页面关闭窗口的同时刷新父页面......
  • 查看 SQL Server 当前的连接数
    打开SQLServerManagementStudio(SSMS),连接到SQLServer实例。在SSMS的“对象资源管理器”窗格中,展开服务器节点。点击“管理”文件夹,然后选择“活动连接”。在“......
  • SQLServer跨服务器查询
    SQLServer跨服务器查询创建链接服务器execsp_addlinkedserver'ITSV','','SQLOLEDB','远程服务器名或ip地址'execsp_addlinkedsrvlogin'ITSV','false',null,'......
  • Server-Sent Events Is it http2 server push?
    Person:Pleasegivemeanexamplewhereginimplementsserverpushandthefrontendreceivesdata.ChatGPT:Sure!Here'sanexampleofhowyoucouldimplem......
  • 77.sizeof和strlen
    1.sizeof运算符●sizeof运算符返回一条表达式或者一个类型名字所占的字节数,sizeof运算符满足右结合律,其所得的值是一个是size_t类型的常量表达式。●size_t是一种机器相......
  • http-server 本地运行前端项目
    1.安装:1npminstall-ghttp-server2.启动:1http-server 3.如果本地联调接口时,加上 -P域名地址 就不会有跨域的问题了http-server-Phttp://tp.iuoooo......
  • sql server 查找阻塞
    CREATEPROCEDURE[dbo].[sp_who_lock]ASBEGINDECLARE@spidINT,@blINT,@intTransactionCountOnEntryINT,......
  • Node.js: 如何退出node命令或者node server
    如果是要退出node命令的话,可以使用:$node>9+2332>process.exit()$ 或者$node>9+2332>.exit$ 如果是要退出nodeserver的话,可以使用:  别人是推荐点击两......
  • 转载:PageOffice 在线编辑 office文件,回调父页面
    一、子页面调用父页面的方法varvalue=window.external.CallParentFunc("ParentFunName(Arguments);");//父页面的JS函数有返回值window.external.CallParentFunc("......
  • disk2vhd工具迁移Server2008R2过程注意事项
    第一步:使用disk2vhd工具1、官网下载最新版本;2、如果报错尝试兼容性运行;3、存储位置可以使用网络存储位置;第二步:hyperV下面创建虚拟机1、按照常规步骤创建,选择【第一代......