问题现象:

crictl images
WARN[0000] image connect using default endpoints: [unix:///var/run/dockershim.sock unix:///run/containerd/containerd.sock unix:///run/crio/crio.sock unix:///var/run/cri-dockerd.sock]. As the default settings are now deprecated, you should set the endpoint instead. 
E0722 23:05:31.059137   34283 remote_image.go:119] "ListImages with filter from image service failed" err="rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial unix /var/run/dockershim.sock: connect: no such file or directory\"" filter="&ImageFilter{Image:&ImageSpec{Image:,Annotations:map[string]string{},},}"
FATA[0000] listing images: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix /var/run/dockershim.sock: connect: no such file or directory"

分析:
根据报错提示,使用的容器运行时是:/var/run/dockershim.sock。然后,我目前k8s的版本是v1.25.0,容器运行时应该是/run/containerd/containerd.sock。因为做以下修改。

crictl config runtime-endpoint /run/containerd/containerd.sock
# 或者选择修改配置文件也可,修改文件这个我没去验证
# vi /etc/crictl.yaml
Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐