Varunkumar Nagarajan
Varunkumar Nagarajan

Reputation: 2047

Kubernetes - Liveness httpGet probe closes the connection before reading the entire body

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.

Upvotes: 0

Views: 343

Answers (1)

Varunkumar Nagarajan
Varunkumar Nagarajan

Reputation: 2047

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.

Upvotes: 4

Related Questions