Kubernetes Pod receiving curl requests when restarting from deletion, with replicated pod alive

Viewed 31

I have a deployment with 2 replicated pods. These pods are using an internal clusterIP.

I have a dummy pod, running a script making curl requests to a service hosted on these pods. When I delete one of these pods, half of the requests are still being sent to the pod restarting. So the requests are unsuccessful. I expected kubernetes to transfer all this traffic to the running pod.

edit: My requests are targeting the service NOT the individual pods

How can I implement this expected behavior?

I am using EKS

1 Answers

I fixed this by implementing readiness and liveness probes

Related