Metal³

The core component behind CCD's bare metal based deployments

Lennart Jern @ Ericsson Software Technology Finland

10th May 2022

metal3.io

What is Metal³?

The Metal³ project (pronounced: “Metal Kubed”) provides components for bare metal host management with Kubernetes. You can enroll your bare metal machines, provision operating system images, and then, if you like, deploy Kubernetes clusters to them.

Components:

  • BareMetal Operator (BMO)
  • Cluster API Provider Metal³ (CAPM3)
  • IP Address Manager (IPAM)

Builds on and integrates with:

  • Ironic
  • Ironic Python Agent (IPA)
  • Cluster API

Metal³

Metal³ Stack

Metal³

management

storage

compute

network

Ironic documentation : https://docs.openstack.org/ironic/latest/

Ironic

Baremetal Operator

Cluster-api-provider-metal3

Cluster API

Metal³

Node

Machine

GCP

Machine

Baremetal

Operator

Metal3

Machine

AWS

Machine

BareMetalHost

Managing bare metal hosts

Prerequisite: A Kubernetes cluster (the management cluster).

  1. Setup Ironic and BareMetal Operator
  2. Write Kubernetes manifests representing your hardware: BareMetalHosts
  3. Manage your hosts by making changes to the BareMetalHosts in Kubernetes. For example: set boot image, user data, clean disk and inspect hardware details.

Metal³

apiVersion: metal3.io/v1alpha1
kind: BareMetalHost
metadata:
  name: node-0
spec:
  bmc:
    address: ipmi://192.168.111.1:6230
    credentialsName: node-0-bmc-secret
  bootMACAddress: 00:30:22:36:87:8f
  bootMode: legacy
  image:
    checksum: http://172.22.0.1/images/CENTOS_9_NODE_IMAGE_K8S_v1.24.1-raw.img.md5sum
    checksumType: md5
    format: raw
    url: http://172.22.0.1/images/CENTOS_9_NODE_IMAGE_K8S_v1.24.1-raw.img
...

Bare metal Kubernetes clusters

Prerequisite: previous slide

 

  1. Setup Cluster API with the Metal³ provider
  2. Write manifests for CAPM3 resources: Metal3Cluster, IPPool, Metal3MachineTemplate, Metal3DataTemplate
  3. Write/generate manifests for CAPI resources: Cluster, KubeadmControlPlane, MachineDeployment, KubeadmConfigTemplate
  4. Manage both hosts and cluster through the Kubernetes API.

Metal³

Metal³ and Cluster API

Metal³

Cluster

Metal3Cluster

Kubeadm-ControlPlane

M3Machine-Template

Metal3Machine

Machine-Deployment

M3Machine-Template

Metal3Machine

Machine

Machine

BareMetalHost

BareMetalHost

Created by the user

Metal³

Metal³ Community 

Contributors:  Red Hat, Ericsson, Mirantis, Dell EMC, Fujitsu, AT&T

#cluster-api-baremetal channel on K8S slack

Community meetings in Zoom. Every Wednesday, @14:00 UTC

Meeting recordings & Demos: Metal³ YouTube channel

Useful links

The Open Source Technology behind CCD

By Lennart Jern

The Open Source Technology behind CCD

Metal³ (“metal kubed”) is an open-source bare metal host provisioning tool created to enable Kubernetes-native infrastructure management. With Metal³ bare metal hosts can be managed via custom resources through the Kubernetes API. The Metal³ project is also building integration with the Kubernetes cluster-api project, allowing Metal³ to be used as an infrastructure backend for Machine objects from the Cluster API.

  • 650