https://www.techtarget.com/searchitoperations/tip/Explore-the-benefits-of-containers-on-bare-metal-vs-on-VMs
You know why you should consider containers. But do you know which type of infrastructure to deploy them on? Are containers on bare-metal servers a better choice than on VMs?
The answer, of course, depends on lots of variables. There are pros and cons of running containers on bare metal, as well as on VMs. The differences in the way container orchestrators, such as Kubernetes, work when hosted on bare metal as compared to VMs is also a factor to consider.
The debate over the advantages and disadvantages of bare-metal servers vs. virtualized hosting environments is not new. It has been on CTOs' minds since virtualization became widespread in data centers in the 2000s, long before anyone had heard of Docker containers, which debuted in 2013.
The main benefits of bare-metal servers include:
VMs, on the other hand, offer the following advantages:
But VMs also come with some drawbacks:
Modern virtualization platforms can help admins work around these limitations. For example, an admin can create a dynamic disk image that expands as VM use increases to avoid locking up storage space on a host before a guest actually uses it. Pass-through features also provide VMs with direct access to physical hardware on a host. However, these hacks don't always work well. They are not supported on all types of hosts and guest OSes, and they create additional administrative burdens. If the apps you want to run require bare-metal access, then it's best to run those apps on a bare-metal server.
Or you could run your apps inside containers on bare metal to get the best of both worlds.
Containers on bare-metal hosts get many of the advantages VMs offer, but without the drawbacks of virtualization:
In addition, by running containers on bare metal, you get the benefits that have traditionally been possible only with VMs:
In short, run containers on bare metal to square the circle -- do what seems impossible. Reap all the benefits of bare-metal servers' performance and hardware accessibility, and take advantage of the portability and isolation features seen with VMs.
There are reasons, however, IT organizations don't run containers on bare metal. Consider the following drawbacks of using bare-metal servers, rather than VMs, to host a container engine:
Historically, there was not an easy, efficient way to run Linux containers on a Windows host. However, this is now easier to do using tools such as Linux Containers on Windows and Windows Subsystem for Linux in conjunction with Docker. These tools enable developers to run Linux and Windows containers side by side on a Windows host, which is advantageous when developing containerized apps for both Windows and Linux.
Keep in mind, however, that these tools are intended primarily for developers. They're not a way to deploy Linux and Windows containers side by side in production.
In addition to considering the pros and cons of running containers themselves on bare metal, consider the implications of hosting a container orchestrator, such as Kubernetes, on bare metal.
Most container orchestrators are compatible with both bare metal and VM-based environments. Some, like HPE Container Platform, which is based on Kubernetes, even market their bare-metal compatibility as a selling point. However, there are certain orchestrators that don't support bare-metal deployments, such as Google Kubernetes Engine. Conversely, all of the major orchestrators support VMs; there is no orchestrator that requires bare metal. Thus, to host containers on bare metal, be careful to select an orchestrator that supports this approach.
In addition, weigh the pros and cons of running the orchestrator master and worker nodes on bare metal vs. VMs. In general, an orchestrator running on a bare-metal environment offers the same advantages as containers hosted on bare metal: There are no infrastructure resources wasted on abstraction layers, which leaves more resources available for apps.
On the other hand, hosting a container orchestrator on bare metal can pose some risks. For one, if you provision each bare-metal server as a single node -- which you have to do if you want to host nodes as bare metal -- you risk more disruption to the cluster if a node goes down, because it will take all of the host server's resources with it. In contrast, a bare-metal server that is provisioned into several nodes, each running in its own VM, is less prone to total failure: If one node fails, the other nodes hosted on the same bare-metal server will remain available.
Running each bare-metal server as a physical node also gives you fewer nodes overall, which can reduce the ability to spread pods or containers across the cluster to optimize availability and load balancing. Likewise, you might end up needing more containers to share a single node, which might increase noisy neighbor issues.
In other words, deploying an orchestrator on bare metal is akin to putting all of your eggs in one basket -- or, at least, to spreading your eggs out among relatively few baskets -- if you think of your nodes as eggs.
Bare-metal orchestrator nodes are also subject to the same portability and OS-dependency limitations as bare-metal containers. A bare-metal node doesn't migrate to a new machine very easily, and bare-metal nodes only run if the host OS supports the orchestrator. As with Docker containers, all mainstream Linux distributions support Kubernetes, but Windows support for Kubernetes is much more limited. Only Windows Server 2019 is compatible with Kubernetes, and it can run only as a worker node; Kubernetes master nodes can only run on Linux.
20 Nov 2020