Incase a pod goes down in my cluster, it takes around 15secs or more to determine the failure by readiness probe logic, which is not accepted because of call failure (since kubernetes is not identified the pod failure so it will send the traffic to the failed pod / I mean the failed pod is still in the cluster-P service endpoint).
Please suggest here, how to fail the readiness probe immediately or how to remove the endpoint immediately in case of failure, without much reduce the periodSeconds to below 5secs.
Below is my configuration:
initialDelaySeconds:90s
periodSeconds:5s
timeoutSeconds:2s
successThreshold:<default>
failureThreshold:<default>
Thanking in advance.
What you can do is to adjust you probe's configuration in order to meet you requirements:
You haven't specified the
failureThreshold
so it defaults to 3. The values you are currently using would take ~15-20 seconds to consider the pod as failed and restart it.If you set the minimal values for
periodSeconds
,timeoutSeconds
,successThreshold
andfailureThreshold
you can expect more frequent checks and faster pod recreations.