containerd启动容器报错

报错信息

**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/ed17cbdc31099314dc8fd609d52b0dfbd6fdf772b78aa26fbc9149ab089c6807/log.json: no such file or directory): runc did not terminate successfully: exit status 127: unknown**

系统

Linux k8s-node01 5.18.15-1.el7.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jul 28 09:26:15 EDT 2022 x86_64 x86_64 x86_64 GNU/Linux

原因

centos7默认的libseccomp的版本为2.3.1,不满足containerd的需求

解决

# rpm -e libseccomp-2.3.1-4.el7.x86_64
错误:依赖检测失败:
        libseccomp.so.2()(64bit) 被 (已安裝) chrony-3.4-1.el7.x86_64 需要
# rpm -e libseccomp-2.3.1-4.el7.x86_64 --nodeps

#### 重启containerd
# systemctl restart containerd
#### 查看执行结果
# kubectl  get pod -A
NAMESPACE     NAME                                       READY   STATUS    RESTARTS       AGE
kube-system   calico-kube-controllers-56cdb7c587-k8grb   1/1     Running   1 (91s ago)    18m
kube-system   calico-node-42qs2                          1/1     Running   2 (56s ago)    18m
kube-system   calico-node-sk6sg                          1/1     Running   1 (110s ago)   18m
kube-system   calico-node-vtq9d                          1/1     Running   1 (85s ago)    18m
kube-system   calico-typha-6775694657-24mzh              1/1     Running   1 (110s ago)   18m
This entry was posted in 小技巧. Bookmark the permalink.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.