A Kubernetes operator that implements the Cluster API infrastructure provider for bare-metal machines.
Simple, reliable approach: Redfish power management + iPXE network boot + Hardware inspection.
Why Beskar7?
- Simple - No complex vendor-specific workarounds
- Reliable - Only uses universally-supported Redfish features
- Vendor Agnostic - Works with any Redfish-compliant BMC
- Hardware Discovery - Collects real hardware specs via inspection
- Clean architecture, minimal dependencies - Distroless image, no CGO, narrow RBAC
How It Works
- Beskar7 claims a physical host
- Sets PXE boot flag via Redfish
- Powers on the server
- Server network boots inspection image (iPXE)
- Inspection image collects hardware details
- Reports back to Beskar7
- Validates hardware requirements
- Writes the digest-verified whole-disk OS image and injects the bootstrap config
- Reboots into the provisioned OS; the machine joins the cluster
Current Status
Version: v0.7.0 — adds Beskar7ClusterTemplate, so Beskar7 can be used from a Cluster API ClusterClass. Additive: no API, CRD-schema or contract change, and nothing to do on upgrade from v0.6.x. Coming from v0.5.0 or earlier, read upgrading — v0.6.0 was breaking.
API: infrastructure.cluster.x-k8s.io/v1beta2 is the only served version — the v1beta1 schema renamed in place, with no conversion webhook: v1beta1 CRDs and objects must be recreated (see Upgrading). From here the schema evolves additive-only.
Contract: controller↔inspector wire contract v4.2, frozen (contract). Pair with a contract-v4.2 inspector release.
Upgrading: v0.4.0 is not compatible with v0.3.x, and the alpha series contains breaking API changes — see Upgrading and the CHANGELOG.
Installation
Prerequisites
- Kubernetes v1.31+ with kubectl configured
- Cluster API v1.11+ — the controller reads the
cluster.x-k8s.io/v1beta2 API (install with clusterctl)
- cert-manager v1.16+ (installation guide)
- iPXE infrastructure - DHCP + HTTP server (setup guide)
- Inspection image -
vmlinuz + initrd.img from beskar7-inspector releases, served by your boot server. Match the inspector to the contract version your controller speaks (see iPXE Setup).
Quick Install
Using Helm (Recommended):
helm repo add beskar7 https://projectbeskar.github.io/beskar7
helm repo update
helm install beskar7 beskar7/beskar7 \
--namespace capb7-system --create-namespace
Using clusterctl (add the provider to ~/.cluster-api/clusterctl.yaml first, see Installation):
clusterctl init --infrastructure beskar7 # v0.5.0 and later publish the clusterctl assets
Using Release Manifests:
kubectl apply -f https://github.com/projectbeskar/beskar7/releases/download/v0.7.0/beskar7-manifests-v0.7.0.yaml
See Installation for detailed install steps, or the Quick Start for the first provisioning flow.
Basic Usage
1. Register a Physical Host
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
kind: PhysicalHost
metadata:
name: server-01
spec:
redfishConnection:
address: "https://192.168.1.100"
credentialsSecretRef: "bmc-credentials"
2. Create a Machine
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
kind: Beskar7Machine
metadata:
name: worker-01
spec:
# Directory the boot server serves the inspector from; the controller
# appends /vmlinuz and /initrd.img when it renders the iPXE script.
inspectionImageURL: "http://boot-server/beskar7-inspector"
# A whole-disk raw OS image (not a tarball or ISO) with a bootstrap agent
# baked in — see docs/beskar7machine.md for the image requirements.
targetImageURL: "http://boot-server/images/kairos-k3s.raw"
# Required. The inspector verifies the downloaded bytes against this and
# refuses to write the disk on a mismatch — it is the integrity anchor.
# sha256sum kairos-k3s.raw
targetImageDigest: "sha256:<64-hex-digest-of-the-bytes-at-targetImageURL>"
hardwareRequirements:
minCPUCores: 4
minMemoryGB: 16
These snippets assume the boot infrastructure from the prerequisites is already
in place (DHCP/TFTP + iPXE, a boot server serving the inspector and the OS
image, and the controller's callback endpoint reachable from the host network).
Quick Start walks the first provisioning flow end to end.
Complete examples: See examples/ directory for full cluster configurations.
Architecture
Beskar7 consists of three main controllers:
- PhysicalHost Controller - Manages BMC connections and power state
- Beskar7Machine Controller - Orchestrates provisioning workflow
- Beskar7Cluster Controller - Manages cluster-level infrastructure
Detailed architecture: See docs/architecture.md
Hardware Compatibility
Designed for any Redfish-compliant BMC — one code path, no vendor-specific
handling. Validated against emulated BMCs and the DMTF reference mockup; no
physical vendor BMC has been validated yet, so pilot before committing a fleet.
Details: See docs/hardware-compatibility.md
Documentation
Development
git clone https://github.com/projectbeskar/beskar7.git
cd beskar7
make build
make test
See docs/ci-cd-and-testing.md for complete development guide.
Contributing
Contributions are welcome — see CONTRIBUTING.md for setup, the
checks to run before opening a PR, and the parts of the codebase that carry
non-obvious constraints (the versioned inspector contract, RBAC's three
hand-maintained copies, and CAPI failure semantics).
Found a security issue? Please report it privately — see SECURITY.md.
License
Apache License 2.0 - See LICENSE file for details.
Support
Acknowledgments
This project was inspired by and learns from:
Beskar7 - Simple, reliable bare-metal provisioning for immutable Kubernetes.