1
votes

I have a Deployment configuration that keeps a certain amount of Pods alive. However due to some strange circumstances these Pods fail the readiness probes sometimes and do not recover after a restart thus requiring me to manually delete the Pod from the Replica Set.

A solution to this would be to set the Pod restartPolicy to Never but that is actually not supported https://github.com/kubernetes/kubernetes/issues/24725.

My question is what alternatives are there to make it so that if a Pod has failed it's readiness probe then the Pod would be deleted.

1
What are the strange circumstances? What you are saying shouldn't be the case.manojlds
The DNS stops resolving inside of a Pod thus making it completely dead. For some reason this only recovers after deleting the Pod but restarts don't seem to affect it.Homulvas
Could you please provide yaml files for the pods with the readiness probe, and output of the command kubectl describe pod?mebius99

1 Answers

0
votes

You could change the liveness probe to make it fail whenever the readiness probe fails. This would kill the pod, and start a new one.