kubernetes 错误合集 问题汇总
来源:原创
时间:2019-06-29
作者:脚本小站
分类:云原生
错误:
Warning FailedCreatePodSandBox 17m (x6 over 17m) kubelet, k8s-02 Failed create pod sandbox: rpc error: code = Unknown desc = failed to create a sandbox for pod "xxx": Error response from daemon: Conflict. The container name "/k8s_POD_monitoring-xxx" is already in use by container "xxx". You have to remove (or rename) that container to be able to reuse that name.
使用下面的目录删除状态为Exited的容器,Error 的 Pod会逐渐运行。
docker rm $(docker container ls --all | grep Exited | awk '{print $1}')
错误:
Warning FailedCreatePodSandBox 37s kubelet, k8s-node3 Failed create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "" network for pod "": NetworkPlugin cni failed to set up pod "" network: failed to set bridge addr: "cni0" already has an IP address different from 10.244.4.1/24
出现这种情况是把节点删除后又添加了进来,调度Pod时出现的,而且这个节点上的Pod一直处于ContainerCreating ,可能是在被删除的节点上运行kubeadm reset 命令将原有的网络设置还原了。解决办法如下:
echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables echo 1 > /proc/sys/net/bridge/bridge-nf-call-ip6tables