1. 程式人生 > 其它 >Kubernetes報錯:Error from server: error dialing backend: dial tcp x.x.x.x:10250: connect: no route to ...

Kubernetes報錯:Error from server: error dialing backend: dial tcp x.x.x.x:10250: connect: no route to ...

技術標籤:問題解決kubernetesiptableslinuxjava資料庫

問題

執行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