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.
What I don't understand however is how containerisation management technologies such as swarm or kubernetes stop over provisioning.
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?
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.
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.