Kubernetes报错:Error from server: error dialing backend: dial tcp x.x.x.x:10250: connect: no route to host

问题

执行kubectl命令时报错

#查看日志
kubectl logs xxxxx
#进入pod容器
kubectl exec -it xxxx

解决

检查Pod所在节点的防火墙是否开启

#查看Pod所在的Node
kubectl get pods -o wide
#在Node节点查看防火墙状态
systemctl status firewalld
#如果出现绿色running状态,可考虑关闭防火墙,或通过iptables放行入方向10250端口,这里仅关闭防火墙
systemctl disable --now firewalld
原文地址:https://www.cnblogs.com/hellxz/p/13268279.html