<p>I'm trying to create my own deployment on a Kubernetes cluster based on a CMS (Prestashop). And I imagine that I will have to update the image regularly.</p>
<p>The CMS comes with 2 ways of update :</p>
<ul>
<li>via there module (1 click upgrade) : this method is not suitable for automation and will break the parallel running images</li>
<li>via upgrade script on the install folder.</li>
</ul>
<p>the question is how i can achieve a rollig update strategy that can pull the image ready to serve the client and update the schema and the underlying scripts that should alter the database just ONCE, so that new running pods don't break the database</p>
<p>i already created the docker ready to serve image, the issue now is with the updating strategy and the impact on the database.</p>
<p>NB: the database is running on a separate namespace and in a separate statefulSet</p>

Abderraxim
<p>Without any knowledge of Prestashop, your question brings up two deployment/upgrade patterns within Kubernetes:</p>
<p>#1. Operators - <a href="https://kubernetes.io/docs/concepts/extend-kubernetes/operator/" rel="nofollow noreferrer">operators</a> are built and used to perform the complex type of tasks you are describing. A <em>very quick</em> search shows no signs of operators that exist, so this would be a longer path and a lot of custom code to create/maintain.</p>
<p>#2. Helm - <a href="https://helm.sh/" rel="nofollow noreferrer">Helm</a>  is a deployment management solution that can also help with this type of activity by deploying <em>charts</em>. A <em>very quick</em> search shows that the bitnami repo (owned by vmware now I believe) has a prestashop Helm chart <a href="https://github.com/bitnami/charts/tree/main/bitnami/prestashop" rel="nofollow noreferrer">here</a></p>
<p>If it were me, I'd explore the option of looking at the Prestashop helm chart and testing that out to see if it could work for you. It looks to be receiving regular updates (last commit was 3 weeks ago) and might ease your burdens (including image management, etc.)</p>
