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

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

解决

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

#查看Pod所在的Node
kubectl get pods -o wide
#在Node节点查看防火墙状态
systemctl status firewalld
#如果出现绿色running状态,可考虑关闭防火墙,或通过iptables放行入方向10250端口,这里仅关闭防火墙
systemctl disable --now firewalld

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

上一篇:AJAX和JSON


下一篇:Linux curl get请求参数多个参数被截断的解决方法