Kubernetes Application Upgrade Strategy for stateful Apps

3/16/2019

There are many upgrade strategies such as:

  • Rolling upgrade

  • Blue Green

  • A/B testing

  • Canary

and they work for apps with shared-nothing-architecture. and some strateigies also work for a distributed clusterd app like rolling upgrade for ElasticSearch

I just need to confirm that either of those strategies doesn't apply to an app that is stateful and doesn't support clustering at data tier. ( such as only one instance of app can write to external Database [ and persistent Volume ] at a time ) ?

So I wonder that the only way to upgrade is to stop and delete the current deployment and deploy a new one , with some down time?

-- Ijaz Ahmad Khan
kubernetes
kubernetes-deployment
load-balancing
stateful

1 Answer

3/21/2019

In Kubernetes 1.7 and later, the StatefulSet controller supports automated updates. There are 2 valid methods, RollingUpdate and OnDelete.

For more info check this Official Documentation

-- coolinuxoid
Source: StackOverflow