<p>Does kubernetes ever <em>create</em> pods as the result of draining a node? I'm not sure whether this is a feature I'm missing, or whether I just haven't found the right docs for it.</p>
<p>So here's the problem: I've got services that want to be always-on, but typically want to be a single container (for various stupid reasons having to do with them being more stateful than they should be). It's ok to run two containers temporarily during deployment or maintenance activities, though. So in ECS, I would say &quot;desired capacity 1, maximumPercent 200%, minimumHealthPercent 100%&quot;. Then, if I need to replace a cluster node, ECS would automatically scale the service <em>up</em>, and once the new task was passing health checks, it would stop the old task and then the node could continue draining.</p>
<p>In kubernetes, the primitives seem to be less-flexible: I can set a pod disruption budget to prevent a pod from being evicted. But I don't see a way to get a deployment to temporarily scale up as a result of a node being drained. The pod disruption budget object in kubernetes, being mostly independent of a deployment or replica set, seems to mainly act as a blocker to draining a node, but not as a way to eagerly trigger scale-up.</p>

bsmedberg
<p>In Kubernetes, deployments will only create new pods when <code>current replicas</code> are below <code>desired replicas</code>. In another word, the creation of a new Pod is triggered post disruption.</p>
<p>By design, deployments do not observe the disruption events(and probably it's not possible, as there are many voluntary actions) nither the eviction API directly. Hence the deployments never scale up automatically.</p>
<p>Probably you are looking for something like `horizontal pod autoscaler. However, this only scales based on resource consumption.</p>
<p><em>I would have</em> deployed at least 2 replicas and use <code>pod disruption budget</code> as your service(application) is critical and should run 24/7/365. This is not only for nodes maintenance, but for many many other reasons(voluntary &amp; involuntary) a pod can come down/rescheduled.</p>
