Benefit of running Kubernetes in bare metal and cloud with idle VM or machines?

11/22/2016

I want to know the high level benefit of Kubernetes running in bare metal machines.

So let's say we have 100 bare metal machines ready with kubelet being deployed in each. Doesn't it mean that when the application only runs on 10 machines, we are wasting the rest 90 machines, just standing by and not using them for anything?

For cloud, does Kubernets launch new VMs as needed, so that clients do not pay for idle machines?

How does Kubernetes handle the extra machines that are needed at the moment?

-- aaaaa
containers
google-cloud-platform
kubernetes

1 Answer

11/23/2016

Yes, if you have 100 bare metal machines and use only 10, you are wasting money. You should only deploy the machines you need.

The Node Autoscaler works at certain Cloud Providers like AWS, GKE, or Open Stack based infrastructures.

Now, Node Autoscaler is useful if your load is not very predictable and/or scales up and down widely over the course of a short period of time (think Jobs or cyclic loads like a Netflix type use case).

If you're running services that just need to scale eventually as your customer base grows, that is not so useful as it is as easy to simply add new nodes manually.

Kubernetes will handle some amount of auto-scaling with an assigned number of nodes (i.e. you can run many Pods on one node, and you would usually pick your machines to run in a safe range but still allow handling of spikes in traffic by spinning more Pods on those nodes.

As a side note: with bare metal, you typically gain in performance, since you don't have the overhead of a VM / hypervisor, but you need to supply distributed storage, which a cloud provider would typically provide as a service.

-- MrE
Source: StackOverflow