/var/lib/停靠器/覆盖2:无效参数错误:启动Kubernetes pod时出现图像检查错误

piok6c0g  于 2022-12-22  发布在  Kubernetes
关注(0)|答案(2)|浏览(173)

今天我的kubernetes 1.15显示了这个错误:

Failed to inspect image "registry.cn-hangzhou.aliyuncs.com/dabai_app_k8s/dabai-fat/soa-illidan-superhub:v1.0.3": rpc error: code = Unknown desc = Error response from daemon: readlink /var/lib/docker/overlay2: invalid argument
Error: ImageInspectError

我尝试在本地计算机中提取图像:

~ ⌚ 10:57:02
$ docker pull registry.cn-hangzhou.aliyuncs.com/dabai_app_k8s/dabai-fat/soa-illidan-superhub:v1.0.3
v1.0.3: Pulling from dabai_app_k8s/dabai-fat/soa-illidan-superhub
e9afc4f90ab0: Already exists
989e6b19a265: Already exists
af14b6c2f878: Already exists
5573c4b30949: Already exists
fb1a405f128d: Already exists
197b0f525c26: Already exists
f133ed18caca: Already exists
ec53837eaf93: Pull complete
24caf1aa821b: Pull complete
f2d6b0ee2469: Pull complete
Digest: sha256:43caa136d717fcca3a6aad96568c9d29745f3c3d391f29facc2bebeb9c26b5a0
Status: Downloaded newer image for registry.cn-hangzhou.aliyuncs.com/dabai_app_k8s/dabai-fat/soa-illidan-superhub:v1.0.3
registry.cn-hangzhou.aliyuncs.com/dabai_app_k8s/dabai-fat/soa-illidan-superhub:v1.0.3
(base)

工作正常,我试着在远程kubernetes集群机器中拉取图像,工作正常。看起来是kubernetes的问题,我应该怎么做才能修复它?

这是我的kubernetes版本:

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.2", GitCommit:"52c56ce7a8272c798dbc29846288d7cd9fbae032", GitTreeState:"clean", BuildDate:"2020-04-16T23:35:15Z", GoVersion:"go1.14.2", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.2", GitCommit:"f6278300bebbb750328ac16ee6dd3aa7d3549568", GitTreeState:"clean", BuildDate:"2019-08-05T09:15:22Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
(base)
rxztt3cl

rxztt3cl1#

我建议您先停止docker引擎,例如通过systemctl stop docker,然后使用rm -rf /var/lib/docker手动删除文件夹。然后您应该使用systemctl start docker再次启动docker。
参考:https://github.com/docker/for-mac/issues/1396

6ioyuze2

6ioyuze22#

对于Kubernetes,您只需使用ssh命令连接到节点,然后使用docker image rm <image_name>:<image_tag>命令删除映像。
例如:

docker image rm -f registry.cn-hangzhou.aliyuncs.com/dabai_app_k8s/dabai-fat/soa-illidan-superhub:v1.0.3

相关问题