<p>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 :</p>

<blockquote>
  <p>kubectl set image deployment/&lt; deployment name > contname=&lt; image-name ></p>
</blockquote>

<p>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)?</p>

<p>Have you <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/" rel="nofollow noreferrer">configured liveness and readiness probes</a> 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.</p>
