Posts

Showing posts from 2021

Kubernetes readiness probe

In some situations an application being deployed to Kubernetes may return an error such as  Readiness probe failed: net/http: request canceled (Client.Timeout exceeded while awaiting headers) Most likely you'd see an error like that from checking a deployment of an application e.g.  kubectl rollout history deployment/application The readiness probe needs to succeed for the pod to be added as an endpoint for the service exposing it. 1) kubectl get po -o wide This is so you can get the pod's cluster IP 2) kubectl exec -t [another_pod] -- curl -I [pod's cluster IP] If you get a 200 response, you know the path is configured properly and the readiness probe should be passing. If you get anything other than a 200 response, this is why the readiness probe fails and you need to check your image.