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.

Comments

Popular posts from this blog

Alternatives to: "The quick brown fox jumps over the lazy dog."

Using keys like ALT+TAB in UltraVNC.

Command-line installation of OpenVPN