node节点无法启动pod

错误日志

  Warning  FailedCreatePodSandBox  29s                 kubelet, k8s-node3  Failed create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "601c6f17dee0325c83f921b6bc42dda410f29bc23e366077d1b6ac9e1ce997e6" network for pod "ynyt-nacos-687bdd45b8-4k2dq": networkPlugin cni failed to set up pod "ynyt-nacos-687bdd45b8-4k2dq_default" network: failed to set bridge addr: "cni0" already has an IP address different from 10.244.5.1/24

解决办法

重置kubernetes服务,重置网络。删除网络配置,link

kubeadm reset
iptables -F && iptables -t nat -F && iptables -t mangle -F && iptables -X
systemctl stop kubelet
systemctl stop docker
rm -rf /var/lib/cni/
rm -rf /var/lib/kubelet/*
rm -rf /etc/cni/
ifconfig cni0 down
ifconfig flannel.1 down
ifconfig docker0 down
ip link delete cni0
ip link delete flannel.1
systemctl start docker
systemctl start kubelet
kubeadm join 。。。