HTTP请求始终在k8s集群容器的容器中被阻止

时间:2019-12-24 08:08:32

标签: kubernetes containers

阶段:

  1. 连接容器的外壳
  2. 卷曲www.xxx.com(//这将一直等待) ...

然后我在主机中使用tcpdump并通过ip进行过滤 tcpdump -i eth0 host ip

3   11:05:05 2019/12/2  133.5701630 10.171.162.231  111.111.222.333 TCP TCP: [Bad CheckSum]Flags=......S., SrcPort=48836, DstPort=HTTP(80), PayloadLen=0, Seq=126843476, Ack=0, Win=29200 ( Negotiating scale factor 0x7 ) = 29200
4   11:05:05 2019/12/2  133.5704230 111.111.222.333 10.171.162.231  TCP TCP:Flags=...A..S., SrcPort=HTTP(80), DstPort=48836, PayloadLen=0, Seq=3228156738, Ack=126843477, Win=2896 ( Negotiated scale factor 0x9 ) = 1482752
5   11:05:05 2019/12/2  133.5704630 10.171.162.231  111.111.222.333 TCP TCP: [Bad CheckSum]Flags=...A...., SrcPort=48836, DstPort=HTTP(80), PayloadLen=0, Seq=126843477, Ack=3228156739, Win=229 (scale factor 0x7) = 29312
6   11:05:05 2019/12/2  133.5705430 10.171.162.231  111.111.222.333 HTTP    HTTP:Request, GET /api/test, Query:debug
7   11:05:05 2019/12/2  133.5707110 111.111.222.333 10.171.162.231  TCP TCP:Flags=...A...., SrcPort=HTTP(80), DstPort=48836, PayloadLen=0, Seq=3228156739, Ack=126843596, Win=6 (scale factor 0x9) = 3072

tcp标志是

src -> dst syn
dst -> src syn/ack
src -> dst ack
src -> dst ack/push
dst -> src ack

curl命令将等待很长时间,然后引发超时错误。在正常的请求中,有一个dst -> src ack/push数据包,但我从未收到。

我不知道为什么以及如何解决它。

---我的deployment.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: test-app-dep
  labels:
    app: test-app
    version: stable
spec:
  replicas: 2
  selector:
    matchLabels:
      app: test-app
      version: stable
  template:
    metadata:
      labels:
        app: test-app
        version: stable
    spec:
      containers:
      - image: test-app
        name: test-app

        livenessProbe:
          httpGet:
            path: /health/status
            port: 80
          initialDelaySeconds: 3
          periodSeconds: 10
        ports:
        - containerPort: 80

0 个答案:

没有答案