简体   繁体   English

Kubernetes Pod随机超时

[英]Kubernetes pod random timeout

I have a Kubernetes deployment containing a very simple Spring Boot web application. 我有一个Kubernetes部署,其中包含一个非常简单的Spring Boot Web应用程序。 I am experiencing random timeouts trying to connect to this application externally. 我在尝试从外部连接到此应用程序时遇到随机超时。

Some requests return instantly whereas others hang for minutes. 有些请求会立即返回,而另一些则挂了几分钟。

I am unable to see any issues in the logs. 我在日志中看不到任何问题。

When connecting to the pod directly, I am able to curl the application and get a response immediately so it feels more like a networking issue. 直接连接到Pod时,我可以curl应用程序并立即获得响应,因此感觉上更像是网络问题。

I also have other applications with the identical configuration running in the same cluster which are experiencing no problems. 我也有其他应用程序,它们在同一群集中运行的配置相同,没有问题。

I am still quite new to Kubernetes so my question would be: 我对Kubernetes还是很陌生,所以我的问题是:

Where and how should I go about diagnosing network issues? 我应该在哪里以及如何去诊断网络问题?

Can provide more information if it helps. 如果有帮助,可以提供更多信息。

As you have narrow down the issue to networking which means components of the cluster are healthy such as Kubelet, Kube-proxy and etc. 当您将问题范围缩小到网络时,这意味着群集的组件运行正常,例如Kubelet,Kube-proxy等。

You can check their status by using systemctl utility. 您可以使用systemctl实用程序检查其状态。 For example 例如

systemctl status kubelet
systemctl status kube-proxy

You can get more detail by using journalctl utility. 您可以使用journalctl实用程序获取更多详细信息。 for example 例如

journalctl -xeu kubelet
journalctl -f -u docker

Now If you want to know what's the destiny of the packets then you need to use iptables utility. 现在,如果你想知道什么是数据包,那么你需要使用iptables工具的命运 It's the one who decides forwarding, routing, and verdict of the packets (incoming or outgoing packetes). 它是决定数据包(传入或传出数据包)的转发,路由和判定的人。

My plan of action is Do Not make any assumptions.I follow following utilities to clear the doubts. 我的行动计划是:不要做任何假设。我遵循以下公用程序来消除疑虑。

  • Kubectl Kubectl

    Kubectl describe pod/svc podName/svcName Kubectl描述pod / svc podName / svcName

  • systemctl systemctl

  • journalctl journalctl
  • etcdctl etcdctl
  • curl 卷曲
  • iptables iptables的

If I still could not solve the issue it means I have made an assumption. 如果我仍然无法解决问题,则意味着我已经做出了假设。

please let me know any other tools I would love to put it on my utility-set 请让我知道我希望将其放入实用程序集的任何其他工具

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM