Provisioning bare metal Kubernetes clusters with Spectro Cloud and MAAS
by Anton Smith on 8 October 2021
Bare metal Kubernetes (K8s) is now easier than ever. Spectro Cloud has recently posted an article about integrating Kubernetes with MAAS (Metal-as-a-Service.
In the article, they describe how they have created a provider for the Kubernetes Cluster API for Canonical MAAS (Metal-as-a-Service). This blog describes briefly the benefits of bare metal K8s, the challenges it presents, and how the work by Saad Malik and the team from Spectro Cloud solves those challenges.
The K8s Cluster API provides an abstraction layer for provisioning to underlying infrastructure such as servers and VMs. Examples of providers include public cloud providers. Now thanks to Spectro Cloud, there is also a provider for MAAS.
What is bare metal Kubernetes?
Let’s recap what bare metal K8s is. Simply put, it is exactly as it sounds. Typically, Kubernetes clusters are built on top of virtual machines (VMs). With bare metal K8s, the cluster is built directly on top of physical servers, with no hypervisor in between.
Why run bare metal Kubernetes?
There are several reasons why it is beneficial to run a K8s cluster directly on bare metal:
- Performance – this is the primary reason for running K8s clusters directly on bare metal. Stripping out the hypervisor provides direct access to the hardware and avoids overheads.
- Hardware compatibility – although most hardware can be passed through to VM guests, there are specific types of hardware that don’t virtualise well. By removing the hypervisor this issue is eliminated.
- Security – Assuming single-tenancy, fewer SW components means a smaller attack surface.
- Cost and operational complexity – depending on the hypervisor used, it can introduce commercial costs and represents another layer to manage and maintain. Note that this depends heavily on whether or not you have a bare metal provisioning system such as MAAS. Without MAAS, cost might increase with bare metal K8s.
Bare metal K8s is best suited to single-tenant installations. This is because the security layer provided by separation of workloads is not needed.
However, it also has problems. Without programmatic server provisioning, a clean infrastructure as code approach wouldn’t be possible. In many cases, operational complexity would increase.
Have your cake and eat it too
Now that we have established the benefits of bare metal K8s, we need to consider how to deal with the downsides. Many of the downsides are related to provisioning, reinstalling servers, keeping inventory etc. This is where MAAS can help.
MAAS, or “Metal As A Service” manages the lifecycle of bare metal and provides a clean and flexible API to do so. It allows you to easily install, upgrade, and rebuild servers, providing them with an operating system such as Ubuntu, from scratch. It enables efficient provisioning, decommissioning, inventory tracking and testing.
As the article notes, MAAS excels at abstracting away the complexity of bare metal: “What makes MaaS appealing is its wide range of support for different types of hardware vendors from Cisco, Dell, HP, and most other vendors through IPMI or Redfish interfaces.
By utilizing the API provided by MAAS, the K8s MAAS Cluster Provider can access bare metal infrastructure in a programmatic way. This removes many of the problems associated with bare metal K8s.
Spectro Cloud has made excellent use of something that MAAS does best – abstracting hardware. They have tied Kubernetes together with MAAS, enabling the usage of bare metal Kubernetes and removing many of the major downsides associated with server management.
MAAS is a critical building block for operators and innovators everywhere. This usage of MAAS and K8s is a perfect example of how different technologies can be combined to provide substantial benefits while removing potential roadblocks.
We are excited to see more use cases such as this one. If you are working on projects that are related to MAAS or would like to learn more about MAAS, we would love to hear from you. In the meantime, try MAAS out, it’s simple to install.
Learn more about MAAS at our Metal As A Service webpage. If you like the nuts and bolts (more puns for the people), you can get into more detail at our About MAAS page, and we’ve also published an ebook.
You can also find information about Kubernetes from Canonical here.
If you’re still interested in using hypervisors, you should also check out LXD.
Developers want Kubernetes infrastructure that is fast, consistent, and without limits! Platform engineering, IT, and DevOps teams are adopting Kubernetes as a Service (KaaS) now more than ever before to streamline efficiency for dev teams and operations. But what happens when the requirement involves deploying clusters directly on top of […]
Bare metal Kubernetes is a powerful set of technologies that builds on the best ideas behind the public and private cloud, yet abstracts away some toilsome aspects related to virtualisation management and networking. For operators and users, it provides significant benefits, making it easier and faster to ship and maintain complex, distri […]
2022 is right around the corner, and it’s not just time to prepare for Christmas, play video games, buy presents, or share anti-Christmas memes. It’s time to start making some predictions for bare metal Kubernetes! Take a minute and let’s think about it. Developers have advent of code so they’re busy right now. Sysadmins and […]