0

I have configured liveness probe using httpGet but it's failing with *error Client.Timeout exceeded while awaiting headers*

But the same API is working fine inside the container(using curl) and outside the container(postman). I have tried adding host attribute in liveness probe but no luck.

Any idea what's going wrong.

Liveness Probe:

 livenessProbe:
        initialDelaySeconds: 45
        periodSeconds: 10
        httpGet:
           path: /health
           port: xxxxx
        timeoutSeconds: 5

Version details:

OpenShift Master->v3.9.0+ba7faec-1
Kubernetes Master->v1.9.1+a0ce1bc657
OpenShift Web Console->v3.9.0+b600d46-dirty
a8989
  • 187
  • 1
  • 14

1 Answers1

1

Try increasing the initialDelaySeconds, port lower, and check for any transitive features (such as PVC) causing slow loading:

livenessProbe:
  httpGet:
    path: /health
    port: 8080
  initialDelaySeconds: 200
  timeoutSeconds: 10
  periodSeconds: 10
  successThreshold: 1
  failureThreshold: 5

PS: For success on probe validation your HTTP return status must be greater than or equal to 200 and less than 400.

Hope this helps

Michael Piefel
  • 18,660
  • 9
  • 81
  • 112
paulogrell
  • 136
  • 1
  • 6