<p>We have an application with 4 pods running with a load balancer! We want to try the rolling update, but we are not sure what happens when a pod goes down! The documentation is unclear! Particularly this quote from <a href="https://kubernetes.io/docs/user-guide/pods/#termination-of-pods" rel="noreferrer">Termination Of Pods</a>:</p>

<blockquote>
  <p>Pod is removed from endpoints list for service, and are no longer considered part of the set of running pods for replication controllers. Pods that shutdown slowly can continue to serve traffic as load balancers (like the service proxy) remove them from their rotations. </p>
</blockquote>

<p>So, if someone can guide us on the following questions : </p>

<p>1.) When a pod is shutting down, can it still serve new requests? Or does the load balancer not consider it?</p>

<p>2.) Does it complete the requests it is processing till the grace-period is exhausted? and then kills the container even if any process is still running? </p>

<p>3.) Also, this mentions replication controllers, what we have is a Deployment and Deployment has replica sets, so will there be any difference?</p>

<p>We went through this question but the answers are conflicting without any source : <a href="https://stackoverflow.com/questions/33611319/does-a-kubernetes-rolling-update-gracefully-remove-pods-from-a-service-load-bala"></a><a href="https://stackoverflow.com/questions/33611319/does-a-kubernetes-rolling-update-gracefully-remove-pods-from-a-service-load-bala">Does a Kubernetes rolling-update gracefully remove pods from a service load balancer</a></p>

<p>1) when a Pod is shutting down it's state is changed to <code>Terminating</code> and it is not considered by the LoadBalancer - as described in the <a href="https://kubernetes.io/docs/concepts/abstractions/pod-termination/" rel="noreferrer">Pod termination</a> docs</p>

<p>2) Yes - you might want to look at the <code>pod.Spec.TerminationGracePeriodSeconds</code> configuration to gain some control. You'll find details in the <a href="https://kubernetes.io/docs/api-reference/v1/definitions/#_v1_podspec" rel="noreferrer">API documentation</a></p>

<p>3) No - the ReplicaSet and the Deployment take care of scheduling Pods, there's no difference when it comes to the shutdown behaviour of the Pods </p>
