Kubernetes:readinessProbes 失败,但 livelinessProbe 使用相同的设置成功
Kubernetes: readinessProbes failing but the livelinessProbe is succeeding with the same settings
我为我的 pod 配置了 livelinessProbe,它在同一 pod 和特定端口上的路径上执行 http-get。它工作得很好。但是,如果我使用相同的设置并配置 readinessProbe,它会失败并出现以下错误。
Readiness probe failed: wsarecv: read tcp :50578->:80: An existing connection was forcibly closed by the remote host
实际上在某些时候我什至看到 liveliness probes 失败了。不知道为什么。 Liveliness 探测成功应该表明 kube-dns 工作正常,我们能够从节点访问 pod。这是我的 pod 规格的 readinessProbe
readinessProbe:
httpGet:
path: /<path> # -> this works for livelinessProbe
port: 80
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 10
有谁知道这里会发生什么。
我认为这与 kube-dns
或 coredns
没有任何关系。此处最可能的原因是您的 pod/container/application 崩溃或停止服务请求。
好像是这样的时间线:
- Pod/container出现了。
- Liveliness 探测通过 ok。
- 一段时间过去了。
- 可能是应用程序崩溃或错误。
- 准备失败。
- 活跃度探测也失败了。
有关该错误含义的更多信息,请点击此处:
An existing connection was forcibly closed by the remote host
我为我的 pod 配置了 livelinessProbe,它在同一 pod 和特定端口上的路径上执行 http-get。它工作得很好。但是,如果我使用相同的设置并配置 readinessProbe,它会失败并出现以下错误。
Readiness probe failed: wsarecv: read tcp :50578->:80: An existing connection was forcibly closed by the remote host
实际上在某些时候我什至看到 liveliness probes 失败了。不知道为什么。 Liveliness 探测成功应该表明 kube-dns 工作正常,我们能够从节点访问 pod。这是我的 pod 规格的 readinessProbe
readinessProbe:
httpGet:
path: /<path> # -> this works for livelinessProbe
port: 80
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 10
有谁知道这里会发生什么。
我认为这与 kube-dns
或 coredns
没有任何关系。此处最可能的原因是您的 pod/container/application 崩溃或停止服务请求。
好像是这样的时间线:
- Pod/container出现了。
- Liveliness 探测通过 ok。
- 一段时间过去了。
- 可能是应用程序崩溃或错误。
- 准备失败。
- 活跃度探测也失败了。
有关该错误含义的更多信息,请点击此处: An existing connection was forcibly closed by the remote host