https://blog.csdn.net/gsying1474/article/details/53256599


执行:

[root@lab1 coredns]# kubectl delete -f coredns.yaml



现象:

[root@lab2 k8s]# kubectl get pods -n kube-system
NAME                       READY     STATUS              RESTARTS   AGE
coredns-6c65fc5cbb-7xvzs   0/1       ContainerCreating   0          2m
coredns-6c65fc5cbb-kh4zg   0/1       ContainerCreating   0          2m



原因:

修改node名称后的遗留症状




查看pod日志,最后部分

[root@lab2 k8s]# kubectl describe po coredns-6c65fc5cbb-7xvzs -n kube-system

"cni0" already has an IP address different from 10.244.5.1/24



解决:

所有节点执行如下:

rm -rf /var/lib/cni/flannel/* && rm -rf /var/lib/cni/networks/cbr0/* && ip link delete cni0
rm -rf /var/lib/cni/networks/cni0/*

 

转载于:https://www.cnblogs.com/effortsing/p/10014611.html

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐