Kubernetes - which pod receives request from load balancer?

3/21/2017

I have a load balancer service for a deployment having 3 pods. When I do a rolling udpate(changing the image) by the following command :

kubectl set image deployment/< deployment name > contname=< image-name >

and hit the service continuously, it gives a few connection refused in between. I want to check which pods it is related to. In other words, is it possible to see which request is served by which pods (without going inside the pods and checking the logs in them)? Also, Is this because of a race condition, as in when a pod might have got a request and had just been terminated before receiving that(almost simultaneously - resulting in no response)?

-- Dreams
kubernetes

1 Answer

3/21/2017

Have you configured liveness and readiness probes for you Pods? The service will not serve traffic to a Pod unless it thinks it is healthy, but without health checks it won't know for certain if it is ready.

-- Simon I
Source: StackOverflow