Sermanes
Sermanes

Reputation: 506

Kubernetes in production. Problems with a working pod

I have a question with Kubernetes when deploying a new version.

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.

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.

Thanks!

Upvotes: 2

Views: 155

Answers (1)

Rico
Rico

Reputation: 61551

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:

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

Upvotes: 2

Related Questions