<p>We have been using AWS-ECS for scheduling our containers. The most pressing problem I see with ECS, is the 'resource fragmentation'.</p>

<p>Say I have following task definitions/pods with respective resource requirements:</p>

<pre><code>  POD    CPU    Desired  Total_CPU
- task1  1024      2       2048
- task2  512       4       2048
- task3  256       1       256
</code></pre>

<p>(Keeping only CPU requirements for simplicity)</p>

<p>If we consider VM with available CPU=2048, we need at least 3 VMs to get above services running.</p>

<p>Going further, for running Blue Green deployment we would theoretically need just <strong>one more VM</strong> with 2048 CPU units.</p>

<p>However, as the deployments happen over time, the containers will be dispersed in all available VMs. This will make the Blue Green deployment take too much time (or even fail), due to unavailability of resources.</p>

<p>So, for the Blue Green deployment to predictably work, we would need <strong>many more extra VMs (more $$$)</strong> in the cluster.</p>

<p>I would like to know whether Kubernetes provides such an feature that will consolidate the pods to keep minimum resource fragmentation.</p>

<p>Kubernetes does not currently reschedule pods to rebalance them across nodes, but <a href="https://github.com/kubernetes/kubernetes/issues/12140" rel="nofollow">planning has begun to include a rescheduler</a> for this purpose in our 1.3 release in a few months.</p>
