failed to create shim task: OCI runtime create failed

报错

[root@master1 coredns]# kubectl  -n kube-system describe pod calico-kube-controllers-798cc86c47-kz9rr
....
	....
Events:
  Type     Reason                  Age                   From     Message
  ----     ------                  ----                  ----     -------
  Warning  FailedCreatePodSandBox  18m (x648 over 161m)  kubelet  (combined from similar events): Failed to create pod sandbox: rpc error: code = Unknown desc = failed to create containerd task: failed to create shim task: OCI runtime create failed: unable to retrieve OCI runtime error (open /run/containerd/io.containerd.runtime.v2.task/k8s.io/4db380718fd40978d9693185670faf1f9c378e2ce93d18a9eabc3645ba0fbcad/log.json: no such file or directory): runc did not terminate successfully: exit status 127: unknown




# 解决
包下载地址:
https://almalinux.pkgs.org/8/almalinux-baseos-x86_64/libseccomp-2.5.2-1.el8.x86_64.rpm.html
https://almalinux.pkgs.org/8/almalinux-appstream-x86_64/libseccomp-devel-2.5.2-1.el8.x86_64.rpm.html


# 下载并安装
[root@master1 ~]# wget https://repo.almalinux.org/almalinux/8/BaseOS/x86_64/os/Packages/libseccomp-2.5.2-1.el8.x86_64.rpm \
https://repo.almalinux.org/almalinux/8/AppStream/x86_64/os/Packages/libseccomp-devel-2.5.2-1.el8.x86_64.rpm \
--no-check-certificate 


[root@master1 ~]# yum -y install /root/*.rpm"


# 删掉部署的calico重新部署 
[root@master1 ~]# kubectl delete -f calico.yaml
[root@master1 ~]# kubectl apply -f calico.yaml
[root@master1 ~]# kubectl get pod -n kube-system -o wide
[root@master1 ~]# kubectl  -n kube-system  describe  pod  calico-kube-controllers-798cc86c47-gkfrh
....
  ....
Events:
  Type    Reason     Age   From               Message
  ----    ------     ----  ----               -------
  Normal  Pulling    24m   kubelet            Pulling image "docker.io/calico/kube-controllers:v3.24.5"
  Normal  Scheduled  76s   default-scheduler  Successfully assigned kube-system/calico-kube-controllers-798cc86c47-gkfrh to master2.lab.example.com

注:可以看到上面正在pull镜像

[root@master1 ~]# kubectl get pod -n kube-system -o wide
NAME                                       READY   STATUS     RESTARTS      AGE    IP              NODE       NOMINATED NODE   READINESS GATES
calico-kube-controllers-798cc86c47-gkfrh   1/1     Running    0             33m    10.88.0.136     master2    <none>           <none>
calico-node-fgfkb                          0/1     Init:2/3   2 (27m ago)   33m    192.168.1.113   master3    <none>           <none>
calico-node-lthqt                          0/1     Init:2/3   0             33m    192.168.1.116   node3      <none>           <none>
calico-node-r5kc9                          0/1     Init:2/3   0             33m    192.168.1.114   node1      <none>           <none>
calico-node-s8xjj                          0/1     Init:2/3   0             33m    192.168.1.112   master2    <none>           <none>
calico-node-t5hs2                          1/1     Running    0             33m    192.168.1.111   master1    <none>           <none>
calico-node-wmgxt                          0/1     Init:2/3   2 (27m ago)   33m    192.168.1.115   node2      <none>           <none>
coredns-78cdc77856-zhhbm                   1/1     Running    0             110m   10.88.1.124     node1      <none>           <none>


posted @ 2022-12-26 17:03  Linux大魔王  阅读(2703)  评论(0编辑  收藏  举报