0

Below is the current configuration of my liveness probe:

  livenessProbe:
      httpGet:
        path: /connectors
        port: 8083
        scheme: HTTP
      initialDelaySeconds: 120
      periodSeconds: 60
      successThreshold: 1
      failureThreshold: 3
      timeoutSeconds: 15

Kubelet pings the endpoint and gets 200. However, the probe closes the connection before reading the entire body. This is causing the server to have broken pipes.

Is there a way to ensure that kubelet reads the entire body before closing the connection?

Note: My probe doesn't have to rely on the response body.

Varunkumar Nagarajan
  • 1,807
  • 1
  • 24
  • 43
  • 1
    Have your application provide an endpoint specifically for healthchecks that delivers a minimal body. – larsks Jan 12 '23 at 17:10

1 Answers1

2

httpGet probe has hardcoded code to read only a 10 KB response. Anything beyond that will not be read. So, it is impossible to read the complete response from the liveness probe.

Alternate solution: Fixing the health check endpoint to deliver a minimal body is an alternate solution.

Varunkumar Nagarajan
  • 1,807
  • 1
  • 24
  • 43