Kubernetes probe without blocking requests to POD on failure

2/6/2019

Given:

  1. My application (call it root) is considered 'ready' when certain number of other PODs connects to it.
  2. I would like to rely on the fact the root application is 'ready' because transition from POD creation to 'readiness' takes considerable amount of time.

Thus I wanted to create readinessProbe, but as it initially fails (waiting for my other PODs to connect), the kubelet blocks all of the requests coming to that root POD making it impossible to fulfill my 'ready' condition.

I managed to handle the situation by adding readinessProbe to all other PODs and thus considering the root POD ready when all other PODs are ready.

Question:
Is it possible to inform kubernetes that even though the readinessProbe fails, the service for that root POD should still accept traffic (from small group of pods at least)?
And more broadly speaking: is it possible to have readinessProbe on kind: Deployment level?

-- lakier
kubernetes
kubernetes-health-check

1 Answer

2/6/2019

There is no way to do that, by design service that is not ready won't receive traffic.

If you elaborate on your design I can try and give you more tips but generally, looks like you might want your root to connect to the other pods and not the other way around.

-- Shai Katz
Source: StackOverflow