<p>I came over something I do not quite understand. When having my <em>Deployments</em> I can define a <em>strategy</em>. Either as <strong>Recreate</strong> or <strong>RollingUpdate</strong>. See this article: <a href="https://www.weave.works/blog/kubernetes-deployment-strategies" rel="nofollow noreferrer">https://www.weave.works/blog/kubernetes-deployment-strategies</a></p>

<p>But now I have a StateFul Set which is not accepting the keyword <code>strategy</code> but wants to have <code>updateStrategy</code>. When trying to pass the type <code>Recreate</code> I am getting this error (from Helm):</p>

<pre><code>Error: StatefulSet.apps "businessmanager-dev-prom-business-manager-set" is invalid: spec.updateStrategy: Invalid value: apps.StatefulSetUpdateStrategy{Type:"Recreate", RollingUpdate:(*apps.RollingUpdateStatefulSetStrategy)(0xc43d534178)}: must be 'RollingUpdate' or 'OnDelete'
Error: UPGRADE FAILED: StatefulSet.apps "businessmanager-dev-prom-business-manager-set" is invalid: spec.updateStrategy: Invalid value: apps.StatefulSetUpdateStrategy{Type:"Recreate", RollingUpdate:(*apps.RollingUpdateStatefulSetStrategy)(0xc43d534178)}: must be 'RollingUpdate' or 'OnDelete'
</code></pre>

<p>This tells me I am not allowed to use <code>Recreate</code>. Why is it not allowed to have the <code>Recreate</code> strategy used in a Stateful Set and why do I have to use <code>updateStrategy</code> rather than <code>strategy</code>? This looks for me like some deprecated behaviour.</p>

xetra11
<p>For stateful sets you can implement Blue/Green update, Rolling update, OnDelete strategy.</p>

<p>Stateful sets used when you are running stateful application inside pod. For example storing something in RAM. redis database run as stateful sets.</p>

<p>Stateful sets managed the sequence automatically like example 'redis-0','redis-1' so if anything goes wrong to pod it will close the process and start new process and try to manage the same state.</p>

<p>If you use strategy <code>Recreate</code> it will delete pod first terminate it and again start the new one it's for stateless applications. Also same way works for Rolling update.</p>
