我是靠谱客的博主 单身小天鹅,这篇文章主要介绍Jenkins k8s plugin pod反复重启,connect: no route to host,现在分享给大家,希望可以做个参考。

新安装了centos的虚拟机作为K8s 的node,添加完成后使用Jenkins指定该node启动pod,但是会反复重启

报错如下:

 查看log:

$ kubectl get pod -n xxx | grep yyy | awk '{print $1}' | xargs -I {} kubectl logs {} -c default  -n xxx
Error from server: Get "xxxxxx/default": dial tcp xxx.xxx.xx.xx: connect: no route to host
Error from server: Get "xxxxxx/default": dial tcp xxx.xxx.xx.xx: connect: no route to host
Error from server: Get "xxxxxx/default": dial tcp xxx.xxx.xx.xx: connect: no route to host
Error from server: Get "xxxxxx/default": dial tcp xxx.xxx.xx.xx: connect: no route to host
Error from server: Get "xxxxxx/default": dial tcp xxx.xxx.xx.xx: connect: no route to host

解决办法:

iptables --flush
iptables -tnat --flush

参考:

Unable to access kubernetes services: no route to host · Issue #6139 · rancher/rancher · GitHub

最后

以上就是单身小天鹅最近收集整理的关于Jenkins k8s plugin pod反复重启,connect: no route to host的全部内容,更多相关Jenkins内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(117)

评论列表共有 0 条评论

立即
投稿
返回
顶部