1、创建Pod一直不成功,执行kubectl describe pod runtime-java-c8b465b98-47m82
查看报错
Warning FailedCreatePodSandBox 2m17s kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "132760792eed7007c26a041da36c15406e582ced36e4ab6e7b6ce780ace1d2ee": plugin type="calico" failed (add): error getting ClusterInformation: Get "https://10.96.0.1:443/apis/crd.projectcalico.org/v1/clusterinformations/default": dial tcp 10.96.0.1:443: connect: no route to host
Normal SandboxChanged 2s (x11 over 2m16s) kubelet Pod sandbox changed, it will be killed and re-created.
2、解决办法
可能是 iptables 规则乱了
systemctl stop kubelet
iptables --flush
iptables -tnat --flush
systemctl start kubelet