<p>I got one service with auto scaling which means it can have 2 pods or 4 pods running. My issue is that this service is a reactjs application with service-worker. </p>

<p>With my current deployment strategy it will create a new pod and kill one at a time, which causes issues when the clients gets alarmed that there is a new update &amp; tries to fetch new assets from server &amp; the loadbalancer forwards it to the old pods. </p>

<p>So basicly I am wondering if it's possible to change to a strategy that creates x pods &amp; replaces them all at the same time? </p>

Joelgullander
<p>Use the <a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy" rel="nofollow noreferrer"><code>Recreate</code> deployment strategy</a> to first kill all old pods and then create new ones.</p>

<p>Alternatively, if you're looking to first create a parallel set of new pods, reroute traffic to these new pods and then kill the old pods (i.e., a <a href="https://www.martinfowler.com/bliki/BlueGreenDeployment.html" rel="nofollow noreferrer">blue/green deployment</a>), check <a href="https://www.ianlewis.org/en/bluegreen-deployments-kubernetes" rel="nofollow noreferrer">this guide</a>.</p>
