Does kubernetes rolling update may impact applications running in pods or not?

10/17/2017

Does kubernetes rolling update may impact applications running in pods or not? This is simple question which I don't see an answer in documentation. Does my application have to be designed to support k8s rolling update?

-- Dmitry Buzolin
kubernetes
upgrade

2 Answers

10/17/2017

Yes, your existing PODs will be terminated and re-create the new PODs with new image. You can specify maxUnavailable and maxSurge to control the rolling update process. Also make sure your application has health check URL defined.

-- sfgroups
Source: StackOverflow

10/18/2017

Your application needs to be designed in a way that survives termination of the process. Be it graceful or not. In that it does not really differ for regular application, where you want it to survive (ie. not corrupt data, not loose state if it is stateful) when server is for example unexpectedly powered down. Running it on cluster you are probably already aware that deployments are intended to run multiple instances of an app in parallel, so your app needs to survive that as well.

Now, that does not mean you can't make it behave better in some cases, like ie. add some termination handling when SIGKILL is received, but that is not exactly kube specific as well.

-- Radek 'Goblin' Pieczonka
Source: StackOverflow