安装KubeEdge报错Error: edge node join failed: unable to determine image API version: rpc error: code = U

简介: 安装KubeEdge报错,报错信息等。

安装KubeEdge报错,报错信息

Error: edge node join failed: unable to determine image API version:

rpc error: code = Unavailable desc = connection error: desc => “transport: Error while dialing dial unix

/run/containerd/containerd.sock: connect: no such file or directory”> execute keadm command failed: edge node join failed: unable to determine image API version: rpc error: code = Unavailable desc = connection error: desc = “transport: Error while dialing dial unix> /run/containerd/containerd.sock: connect: no such file or directory”


1.png


环境:Centos7

k8s版本:1.23.8

尝试解决方案:

参考网上资料:https://blog.csdn.net/qq_38416500/article/details/125377411

crictl config runtime-endpoint unix:///run/containerd/containerd.sock
crictl config image-endpoint unix:///run/containerd/containerd.sock


原因:未配置endpoints

这里需要安装crictl,下载地址:https://github.com/kubernetes-sigs/cri-tools/releases,下载好对应kubelet版本的crictl,然后上传到 /usr/local/bin

目录下解压即可使用,这里不再多说。


但是我发现并不管用,经过一通分析,仔细查看报错信息

发现这个是容器运行时的问题吧,新版本跟k8s保持一致默认使用containerd作为容器运行时,所以这里看你需求,要么检查一下containerd环境是否正常,要么在keadm join的参数里配置使用docker作为容器运行时。


于是来到kubeedge官网,发现这样一段话:

kubeEdge官方安装教程:https://docs.kubeedge.io/zh/docs/setup/keadm_zh/


2.png


这里明确指出:在v1.11.0之后,keadm init 集成了Helm Chart,这意味着 cloudcore 将以容器化的方式运行。

如果您仍需要使用进程的方式启动 cloudcore ,您可以使用keadm deprecated init 进行安装,或者使用v1.10.0之前的版本。


问题原因

1.13版本默认使用containerd,如果需要使用docker,runtimetype和remote runtime endpoint都要在keadm join时指定


解决办法

使用keadm join --help 看一下参数信息,

4.png


注意两个参数:

remote runtime endpoint : KubeEdge Edge Node RemoteRuntimeEndpoint string, If flag not set, it will use unix:///run/containerd/containerd.sock (default “unix:///run/containerd/containerd.sock”),仔细一看这不就是报错信息的那段话么,


runtimetype: Container runtime type (default “remote”) 这里默认使用的是远程remote,那么我们指定一个参数为docker运行镜像就好了


最终运行指令:

 keadm join --cloudcore-ipport=172.23.70.235:10000 --kubeedge-version=1.13.0 --runtimetype=docker  --token=3b00d576d63572e2190799efc3596f936601a15319ee594e5a27343d8ee96859.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2Nzg4MjQxMTJ9.-MUpO6z6De0G0Ad7n4JtI-UZu9eEj1Ik9_OGOCz3Hzw


添加一个参数信息:--runtimetype=docker

成功输出信息如下:


6.png


目录
相关文章
|
JavaScript
nodejs安装之npm ERR! code CERT_HAS_EXPIREDnpm ERR! errno CERT_HAS_EXPIRED reason: certificate has expired-证书错误通用问题解决方案-优雅草央千澈
nodejs安装之npm ERR! code CERT_HAS_EXPIREDnpm ERR! errno CERT_HAS_EXPIRED reason: certificate has expired-证书错误通用问题解决方案-优雅草央千澈
4078 27
|
SQL Java 数据库
flyway报错Caused by: org.flywaydb.core.api.FlywayException: Validate failed: Detected failed migration
flyway报错Caused by: org.flywaydb.core.api.FlywayException: Validate failed: Detected failed migration
615 1
transaction 2 failed while formatting outputs from RPC
transaction 2 failed while formatting outputs from RPC
162 0
|
测试技术 API
8-20|https://gitlab.xx.com/api/v4/projects/4/trigger/pipeline Request failed 状态码400
8-20|https://gitlab.xx.com/api/v4/projects/4/trigger/pipeline Request failed 状态码400
|
JavaScript
【Azure Function App】Nodejs Function遇见WorkerProcessExitException : node exited with code -1073740791 (0xC0000409) 错误
【Azure Function App】Nodejs Function遇见WorkerProcessExitException : node exited with code -1073740791 (0xC0000409) 错误
302 0
【Azure API 管理】解决API Management添加AAD Group时遇见的 Failed to query Azure Active Directory graph due to error 错误
【Azure API 管理】解决API Management添加AAD Group时遇见的 Failed to query Azure Active Directory graph due to error 错误
198 0
|
XML 缓存 API
【Azure API 管理】使用APIM进行XML内容读取时遇见的诡异错误 Expression evaluation failed. Object reference not set to an instance of an object.
【Azure API 管理】使用APIM进行XML内容读取时遇见的诡异错误 Expression evaluation failed. Object reference not set to an instance of an object.
344 0
|
API 数据安全/隐私保护 网络架构
【Azure API 管理】解决调用REST API操作APIM(API Management)需要认证问题(Authentication failed, The 'Authorization' header is missing)
【Azure API 管理】解决调用REST API操作APIM(API Management)需要认证问题(Authentication failed, The 'Authorization' header is missing)
684 0
NPM——Electron failed to install correctly, please delete node_modules/electron and try
NPM——Electron failed to install correctly, please delete node_modules/electron and try
2182 0
|
运维 Ubuntu Shell
阿里云云效操作报错合集之流水线构建Docker镜像时,遇到报错:“error: failed to solve: rpc error: code”,该怎么办
本合集将整理呈现用户在使用过程中遇到的报错及其对应的解决办法,包括但不限于账户权限设置错误、项目配置不正确、代码提交冲突、构建任务执行失败、测试环境异常、需求流转阻塞等问题。阿里云云效是一站式企业级研发协同和DevOps平台,为企业提供从需求规划、开发、测试、发布到运维、运营的全流程端到端服务和工具支撑,致力于提升企业的研发效能和创新能力。