通过 kubeadm join 命令将 node 加入集群时报下面的错误,请问如何解决?container runtime 用的是 containerd
[preflight] Running pre-flight checks
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR CRI]: container runtime is not running: output: time="2022-08-21T16:29:55+08:00" level=fatal msg="getting status of runtime: rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService"
, error: exit status 1
是 /etc/containerd/config.toml 中 registry.mirrors 配置冲突引起的
保留 config_path 配置
config_path = "/etc/containerd/certs.d"
删除下面的配置,问题就解决了
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"]
endpoint = ["https://xxx.mirror.aliyuncs.com"]
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."k8s.gcr.io"]
endpoint = ["registry.aliyuncs.com/google_containers"]