ServerClaims
The ServerClaim Custom Resource Definition (CRD) is a Kubernetes resource used to claim ownership of a bare metal Server resource that is in the Available state. It allows users to specify the desired operating system image and ignition configuration for booting the server. The ServerClaimReconciler handles the allocation of servers to claims and manages the lifecycle of the claim and the server.
Example ServerClaim Resource
Claiming a Specific Server with Ignition Configuration:
yaml
apiVersion: metal.ironcore.dev/v1alpha1
kind: ServerClaim
metadata:
name: my-server-claim
namespace: default
spec:
power: "On"
serverRef:
name: "my-server"
image: "my-osimage:latest"
ignitionSecretRef:
name: "my-ignition-secret"Claiming a Server Using a Selector:
yaml
apiVersion: metal.ironcore.dev/v1alpha1
kind: ServerClaim
metadata:
name: selector-server-claim
namespace: default
spec:
power: "On"
serverSelector:
matchLabels:
hardwareType: gpu-node
location: datacenter-1
image: my-osimage:latest
ignitionSecretRef:
name: my-ignition-secretReconciliation Process
- The
ServerClaimReconcilercreates aServerBootConfigurationresource under the hood. - This resource specifies how the server should be booted, including the image and ignition configuration.
- The
State Transitions:
Available→Reserved: When a server is successfully claimed.Reserved→Available: When theServerClaimis deleted and the server'sspec.reclaimPolicyisRecycle(the default).Reserved→Released: When theServerClaimis deleted and the server'sspec.reclaimPolicyisRetain. The server stays inReleasedwithspec.serverClaimRefset until an operator clears the reference, at which point it transitions back toAvailable.
Release Process:
- On claim deletion the server is powered off and its
BootConfigurationRefis cleared. - With
Recycle,spec.serverClaimRefis also removed automatically and the server returns toAvailable. - With
Retain,spec.serverClaimRefis preserved so the binding can be inspected before the server is released back into the pool.
- On claim deletion the server is powered off and its