Kubernetes CNI 网络插件失败的定位
Pod 一直 ContainerCreating,Events 显示 failed to set up sandbox、network plugin is not ready、failed to allocate IP。节点上的 Pod 网络不通。
kubectl describe pod <pod> -n <ns>
kubectl get pods -n kube-system -o wide
kubectl logs -n kube-system <cni-pod> --tail=100
节点:
journalctl -u kubelet --since '30 min ago' | grep -i -E 'cni|sandbox|network'
ls /etc/cni/net.d/
crictl pods
ip -br addr
/etc/cni/net.d/ 配置缺失/损坏。kubectl — Pod/CNI 状态crictl — 节点容器ip — 地址与路由journalctl — kubelet 日志