k8s报警 FailedCreatePodSandBox

问题:创建pod时一直是ContainerCreating状态,describe时显示:Warning  FailedCreatePodSandBox  17m (x13 over 17m)  kubelet, 192.168.0.4  Failed create pod sandbox: rpc error: code = Unknown desc = failed to start sandbox container for pod "fluentd-es-v2.2.1-fn8wr": Error response from daemon: grpc: the connection is unavailable

查看后有两中情况:

1,资源的单位写错了。参考https://stackoverflow.com/questions/48254911/pods-status-is-always-containercreating-events-show-failed-create-pod-sandb?rq=1

2,网络错误,参考https://github.com/kubernetes/kubeadm/issues/578#event-1362954571

我的是第二种,登入远程主机执行`systemctl restart kubelet` 就好了

-----

补充:今天又这样了。原因可能是我强制删除了pod,没有优雅关闭。按第二种不行,后面直接重启了远程机器的docker 就好了`systemctl restart docker`.

你可能感兴趣的:(k8s)