kubernetes Pod's readinessProbe errored but endpoint not removed from Service kubernetes Pod's readinessProbe errored but endpoint not removed from Service kubernetes kubernetes

kubernetes Pod's readinessProbe errored but endpoint not removed from Service


A probe by the kubelet can end in one of three states:

  • successful
  • failed (command returned a non-0 exit code)
  • errored (command did not return before the timeout elapsed, the command does not exist inside the container, etc)

Here is the code (in 1.10.11) where the event probe errored is recorded. Note that err != nil.

Here is the code that calls the above function - when err != nil (the probe returned an error), the result is discarded.

Only probes that fail will actually cause the pod's ready state to be changed.