Cluster API Provider for Managed Bare Metal Hardware
This repository contains a Machine actuator implementation for the Kubernetes Cluster API.
For more information about this actuator and related repositories, see metal3.io.
- See metal3-dev-env for an
end-to-end development and test environment for
- Setting up for tests
- Using Minikube
- Using OpenShift 4
See the API Documentation for details about the
API used with this
If you would like a MachineSet to be automatically scaled to the number of
matching BareMetalHosts, annotate that MachineSet with key
metal3.io/autoscale-to-hosts and any value.
When reconciling a MachineSet, the controller will count all of the BareMetalHosts that either:
- match the MachineSet's
Spec.Template.Spec.ProviderSpec.HostSelectorand have a ConsumerRef that is
- has a ConsumerRef that references a Machine that is part of the MachineSet
This ensures that in case a BareMetalHost has previously been consumed by a Machine, but either labels or selectors have since been changed, it will continue to get counted with the MachineSet that its Machine belongs to.
MachineHealthCheck Controller in Machine-API operator is checking Node's health. If you would like to remediate unhealthy Machines you should add the following to MachineHealthCheck CR:
annotations: machine.openshift.io/remediation-strategy: external-baremetal
Remediation is done by power-cycling the Host associated with the unhealthy Machine, using BMO reboot API
Remediation steps (triggered by the annotation mentioned above):
- Power off the host
- Add poweredOffForRemediation annotation to the unhealthy Machine
- Delete the node
- Power on the host
- Wait for the node the come up (by waiting for the node to be registered in the cluster)
- Remove poweredOffForRemediation annotation and the MAO's machine unhealthy annotation