EKS:无法从吊舱中提取日志 [英] EKS: Unable to pull logs from pods

查看:81
本文介绍了EKS:无法从吊舱中提取日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

kubectl logs命令间歇性失败,并显示"getsockopt:无主机路由"错误.

kubectl logs command intermittently fails with "getsockopt: no route to host" error.

# kubectl logs -f mypod-5c46d5c75d-2Cbtj

服务器错误:获取 https://XXXX:10250/containerLogs/default/mypod- 5c46d5c75d-2Cbtj/metaservichart?follow = true : 拨打tcp X.X.X.X:10250:getsockopt:主机没有路由

Error from server: Get https://X.X.X.X:10250/containerLogs/default/mypod-5c46d5c75d-2Cbtj/metaservichart?follow=true: dial tcp X.X.X.X:10250: getsockopt: no route to host

如果我运行相同的命令5-6次,它将起作用.我不确定为什么会这样.任何帮助将不胜感激.

If I run the same command 5-6 times it works. I am not sure why this is happening. Any help will be really appreciated.

推荐答案

仅供参考,我刚刚尝试在EKS上使用另一个VPC 172.18.X.X,并且所有kubectl命令都可以正常工作.

Just fyi, I just tried using another VPC 172.18.X.X on EKS, and all kubectl commands works fine.

我还注意到当我使用172.17.X.X VPC时,kops使用172.18.X.X作为码头工人的内部cidr.因此,我推测kops会更改默认docker的cidr,以免与群集IP发生冲突.我希望我们可以在创建EKS辅助节点时配置docker的cidr,也许可以通过CloudFormation yaml模板或其他方式来配置.

Also I noticed that kops uses 172.18.X.X for docker's internal cidr when I was using 172.17.X.X VPC. So I speculate that kops changes default docker's cidr not to collide with cluster IP. I hope we could configure docker's cidr when EKS worker nodes are created, maybe by CloudFormation yaml template or something.

这篇关于EKS:无法从吊舱中提取日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆