Provisioning bare metal Kubernetes clusters with Spectro Cloud and MAAS

Anton Smith

on 8 October 2021

This article was last updated 2 years ago.


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.

A perfect match for bare metal Kubernetes

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:

  1. 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.
  2. 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.
  3. Security – Assuming single-tenancy, fewer SW components means a smaller attack surface.
  4. 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.

MAAS abstracts away the details of the multitude of server and vendor types

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.

Summary

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.

Suggested reading

Canonical has released an extensive whitepaper for bare metal Kubernetes – going in depth into many of the different aspects involved including MAAS, Juju, and Spectro Cloud.

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.

kubernetes logo

What is Kubernetes?

Kubernetes, or K8s for short, is an open source platform pioneered by Google, which started as a simple container orchestration tool but has grown into a platform for deploying, monitoring and managing apps and services across clouds.

Learn more about Kubernetes ›

Newsletter signup

Get the latest Ubuntu news and updates in your inbox.

By submitting this form, I confirm that I have read and agree to Canonical's Privacy Policy.

Related posts

MAAS Outside the Lines

Far from the humdrum of server setups, this is about unusual deployments – Raspberry Pis, loose laptops, cheap NUCs, home appliances, and more. What the heck...

Meet Canonical at KubeCon + CloudNativeCon North America 2024

We are ready to connect with the pioneers of open-source innovation! Canonical, the force behind Ubuntu, is returning as a gold sponsor at KubeCon +...

Data Centre AI evolution: combining MAAS and NVIDIA smart NICs

It has been several years since Canonical committed to implementing support for NVIDIA smart NICs in our products. Among them, Canonical’s metal-as-a-service...