<p>I have a question with Kubernetes when deploying a new version.</p>

<p>My YAML configuration of Kubernetes has the RollingUpdate strategy. The problem comes when it comes to changing versions this way. If I have a php-fpm that is performing an action, does that action get lost? In case it is just changing that pod to the new version.</p>

<p>My main question is if Kubernetes with this strategy takes into consideration if the pod is being used and if so if it waits until he finishes what it has to do and changes it.</p>

<p>Thanks!</p>

<p>If something is dropping your sessions it would be a bug. Generally speaking, if you have a 'Service' that forwards to multiple backend replicas when you do an update it happens one replica at a time. Something like this:</p>

<ul>
<li>New pod created.</li>
<li>Wait for the new pod to be ready and serviceable.</li>
<li>Put the new pod in the Service pool.</li>
<li>Remove the old pod from the Service pool</li>
<li>Drain old pod. Don't take any more incoming connections and wait for connections to close.</li>
<li>Take down the old pod.</li>
</ul>
