<p>I understand the basics how containers and how they differ from running virtual machines. I also get that auto scaling when resources are low and how services such as AWS can horizontally scale and provision more resources for you.</p>

<p>What I don't understand however is how containerisation management technologies such as swarm or kubernetes stop over provisioning.</p>

<p>In my mind -  you still have to have the resources available in order to add more containers as the container management solution is only managing the containers themselves. Correct?</p>

<p>So if I had an ec2 (in the AWS world) which I was using for my application and kubernetes was running on it to manage containers for my application I would still need to have a auto scaling and have to spin up another ec2 if vm itself was being pushed to capacity by my application.</p>

<p>Perhaps because I've not worked with container orchestration as yet I can't grasp the mechanics of this but in principal I don't see how this works harmoniously.</p>

<p>Kubernetes for example,has <strong>Cluster Autoscaler</strong>,which increases or decreases the size of a cluster by adding or removing nodes, based on the presence of pending pods and node utilization metrics. The implementation can change depending on the solution:Google Kubernetes Engine, Amazon EKS, unmanaged AWS EC2, and others.</p>

<p>But if the infrastructure allows it, Kubernetes can communicate with the underlying cloud provider and provision new VMs to host new nodes as necessary, and remove them as well. It does not need to wait for a human operator to provision these instances.</p>
