OpenFaaS : Receiving Timeout errors during health check of function Pod OpenFaaS : Receiving Timeout errors during health check of function Pod kubernetes kubernetes

OpenFaaS : Receiving Timeout errors during health check of function Pod


These errors:

Liveness probe failed: Get "http://XX.XXX.XX.XX:8080/health": context deadline exceeded (Client.Timeout exceeded while awaiting headers)Readiness probe failed: Get "http://XX.XXX.XX.XX:8080/health": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

mean that the HTTP request has failed. For the readiness and liveness probe to work properly, this type of request must be successful.

To find out where the problem is, you need to get the pod IP address. Run:

kubectl get pods -o wide

You should see an output similar to this:

NAME                        READY   STATUS    RESTARTS   AGE   IP          NODE                                       NOMINATED NODE   READINESS GATES<my-pod-name>               1/1     Running   0          25d   10.92.3.4   <my-node-name>                             <none>           1/1

Take your IP and run:

kubectl exec -t <another_pod> -- curl -I <pod's cluster IP>

If you get a 200 response code, it means the endpoint is properly created and configured. Any other answer suggests there is a problem with your image.

See also: