创建pod时报Failed create pod sandbox
kubectl run nginx2 --image=nginx --replicas=2
查看pod状态,如下:
kubectl get all
查看pod描述信息如下:
kubectl describe pod nginx2-6dbf4cd9bc-mbtvh
查看登录到172.16.91.211节点上,查看kubelet的日志
journalctl -u kubelet -f
错误内容如下:
May 17 05:43:30 node2 kubelet[1605]: E0517 05:43:30.259329 1605 pod_workers.go:186] Error syncing pod ee01867e-59a0-11e8-b784-000c29d0d632 ("nginx-8586cf59-cvzbk_default(ee01867e-59a0-11e8-b784-000c29d0d632)"), skipping: failed to "CreatePodSandbox" for "nginx-8586cf59-cvzbk_default(ee01867e-59a0-11e8-b784-000c29d0d632)" with CreatePodSandboxError: "CreatePodSandbox for pod \"nginx-8586cf59-cvzbk_default(ee01867e-59a0-11e8-b784-000c29d0d632)\" failed: rpc error: code = Unknown desc = failed to start sandbox container for pod \"nginx-8586cf59-cvzbk\": Error response from daemon: shim error: docker-runc not installed on system"
解决措施:
安装docker有点问题,
登录到172.16.91.211节点上,
ln -s /usr/libexec/docker/docker-runc-current /usr/bin/docker-runc