Can K8S pods marked as "Not ready" still receive direct requests?

107 views Asked by At

Say you have a K8S pod that has a readiness probe set up, and at some point that probe fails. The docs say that the pod remains alive but is marked as "Not ready" and "does not receive traffic through Kubernetes Services". When that happens, do requests made directly to the pod's IP address still succeed? What about existing websocket connections to that pod - do they remain connected?

1

There are 1 answers

0
Ron Etch On BEST ANSWER

Requests should still succeed if you use pod's IP address.

Readiness probes are used to determine if a pod is ready to receive traffic from kubernetes services, which if it's in "Not Ready" state, the pod shall not be included as endpoint or backend services.

Websocket is a communication protocol used in client-server communication like HTTP requests. HTTP probes are part of liveness and startup probes, wherein the kubelet will send a HTTP request in the specified path and port number to the pod's IP to perform a check.

Since it can be part of the liveness probe, it should not affect the readiness probe because it doesn't wait for it to succeed as stated from the official docs.