Skip to main content
A machine class is a reusable group of machines defined by labels and conditions. It allows you to match machines based on criteria like architecture and CPU count (e.g., amd64 architecture with more than 2 CPUs). Machine classes are used for automated cluster allocation, instead of selecting individual machines, you reference a machine class, and Omni picks matching machines automatically. You can create a machine class them via the CLI with omnictl apply or through the UI under the Machine Classes section.
This example creates a machine class named test using the CLI.It selects machines that meet both of the following conditions:
  • omni.sidero.dev/arch = amd64 — The machine must use an amd64 (x86_64) architecture
  • omni.sidero.dev/cpus > 2 — The machine must have more than 2 CPUs
metadata:
  namespace: default
  type: MachineClasses.omni.sidero.dev
  id: test
spec:
  matchlabels:
    # matches machines with amd64 architecture and more than 2 CPUs
    - omni.sidero.dev/arch = amd64, omni.sidero.dev/cpus > 2
Apply the configuration with:
omnictl apply -f machine-class.yaml