When stateful workloads are deployed using Deployment template instead of StatefulSet the default update strategy should not be RollingUpdate.
In case of a database (f.e. MariaDB) the files are still in use and locked. In case of Redis the latest changes are note written to PVC.
Recreate strategy makes sure that all open files are closed and changes are written to storage before pod gets replaced.
When stateful workloads are deployed using
Deployment
template instead ofStatefulSet
the default update strategy should not beRollingUpdate
. In case of a database (f.e. MariaDB) the files are still in use and locked. In case of Redis the latest changes are note written to PVC.Recreate
strategy makes sure that all open files are closed and changes are written to storage before pod gets replaced.fyi: @tim-hanssen