- 已关闭。**此问题为not about programming or software development。当前不接受答案。
此问题似乎与a specific programming problem, a software algorithm, or software tools primarily used by programmers无关。如果您认为此问题与another Stack Exchange site的主题有关,您可以留下评论,说明在何处可以回答此问题。
3天前关闭。
Improve this question
我正在尝试设置Kubernetes主节点。每次尝试启动Kubelet时,我都会收到错误消息:
command failed" err="failed to validate kubelet flags: the container runtime endpoint address was not specified or empty, use --container-runtime-endpoint to set
我尝试使用以下命令设置容器运行时端点:
sudo kubelet --container-runtime-endpoint=unix:///run/containerd/containerd.sock
但当我这样做时,我会得到以下包含失败命令的日志:
I0116 09:43:02.562785 4142 server.go:412] "Kubelet version" kubeletVersion="v1.26.0"
I0116 09:43:02.563067 4142 server.go:414] "Golang settings" GOGC="" GOMAXPROCS="" GOTRACEBACK=""
I0116 09:43:02.563458 4142 server.go:575] "Standalone mode, no API client"
I0116 09:43:02.566523 4142 server.go:463] "No api server defined - no events will be sent to API server"
I0116 09:43:02.566664 4142 server.go:659] "--cgroups-per-qos enabled, but --cgroup-root was not specified. defaulting to /"
I0116 09:43:02.567002 4142 container_manager_linux.go:267] "Container manager verified user specified cgroup-root exists" cgroupRoot=[]
I0116 09:43:02.567130 4142 container_manager_linux.go:272] "Creating Container Manager object based on Node Config" nodeConfig={RuntimeCgroupsName: SystemCgroupsName: KubeletCgroupsName: KubeletOOMScoreAdj:-999 ContainerRuntime: CgroupsPerQOS:true CgroupRoot:/ CgroupDriver:cgroupfs KubeletRootDir:/var/lib/kubelet ProtectKernelDefaults:false NodeAllocatableConfig:{KubeReservedCgroupName: SystemReservedCgroupName: ReservedSystemCPUs: EnforceNodeAllocatable:map[pods:{}] KubeReserved:map[] SystemReserved:map[] HardEvictionThresholds:[]} QOSReserved:map[] CPUManagerPolicy:none CPUManagerPolicyOptions:map[] ExperimentalTopologyManagerScope:container CPUManagerReconcilePeriod:10s ExperimentalMemoryManagerPolicy:None ExperimentalMemoryManagerReservedMemory:[] ExperimentalPodPidsLimit:-1 EnforceCPULimits:true CPUCFSQuotaPeriod:100ms ExperimentalTopologyManagerPolicy:none ExperimentalTopologyManagerPolicyOptions:map[]}
I0116 09:43:02.567232 4142 topology_manager.go:134] "Creating topology manager with policy per scope" topologyPolicyName="none" topologyScopeName="container"
I0116 09:43:02.567305 4142 container_manager_linux.go:308] "Creating device plugin manager"
I0116 09:43:02.567449 4142 state_mem.go:36] "Initialized new in-memory state store"
E0116 09:43:02.570133 4142 run.go:74] "command failed" err="failed to run Kubelet: validate service connection: CRI v1 runtime API is not implemented for endpoint \"unix:///run/containerd/containerd.sock\": rpc error: code = Unimplemented desc = unknown service runtime.v1.RuntimeService"
有人能帮我吗?
我已经尝试过重新设置kubeadm,因为我在一个论坛上看到可能会导致这个问题。这并没有解决我的问题。除此之外,我看到回到旧版本的Kubernetes将工作。但我没有尝试。我想使用版本1.26,这是最新的。我无法想象Kubernetes使一个版本的containerd不工作。那么在哪里修复?
1条答案
按热度按时间jogvjijk1#
看起来您遇到了在K8s 1.26中删除CRI v1alpha2 API和containerd 1.5支持的问题。
你可以通过移除Ubuntu自带的containerd软件包并从docker仓库安装www.example.com软件包来解决这个问题。然后你会得到一个1.6版本。然后重新生成container的配置,包括组更改,并在1.25 - 05上重新启动。然后你就可以完成到1.26的升级了。containerd.io package from docker repositories. Then you get a 1.6 release. Then re-generate the container's config including the group changes and restart on 1.25-05. Then you are able to complete the upgrade to 1.26.
从那时起,这是一个简单的做发布升级到最新的ubuntu。
请通过类似的ServerFault Answers了解详细的分步srep信息。
如果你已经在使用cri-dockerd,你不会受到dockershim删除的影响。在开始之前,Check whether your nodes use the dockershim.