cluster-api-provider-metal

command module
v0.2.0-alpha.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2020 License: MPL-2.0 Imports: 13 Imported by: 0

README

cluster-api-provider-metal

Intro

The Cluster API Provider Metal (CAPM) is a project by Talos Systems that provides a Cluster API(CAPI) infrastructure provider for bare metal use. Given a reference to a bare metal server and some BMC info, this provider will reconcile the necessary custom resources and boot the nodes using IPMI.

Corequisites

There are a few corequisites and assumptions that go into using this project:

Building and Installing

This project can be built simply by running make release from the root directory. Doing so will create a file called _out/infrastructure-components.yaml. If you wish, you can tweak settings by editing the release yaml. This file can then be installed into your management cluster with kubectl apply -f _out/infrastructure-components.yaml.

Note that CAPM should be deployed as part of a set of controllers for Cluster API. You will need at least the upstream CAPI components and a bootstrap provider for v1alpha2 CAPI capabilities.

Usage

CAPM supports two API types, MetalClusters and MetalMachines. You can create YAML definitions of each and kubectl apply them as part of a larger CAPI cluster deployment. Below are some example definitions of each.

MetalCluster:

apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: MetalCluster
metadata:
  name: talos
  namespace: default
spec:
  apiEndpoints:
    - host: 10.254.0.5
      port: 6443

Note the apiEndpoint specified above. This field is blindly copied into the status for the MetalCluster resource, as CAPI upstream expects their to be an endpoint published. In cloud environments, this is generally a loadbalancer DNS name. In the case of bare metal, it should ideally be a loadbalanced IP or DNS name for all master machines. In my above example, this is an IP attached to the loopback interface of all masters and exposed via BGP/ECMP.

MetalMachine:

apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: MetalMachine
metadata:
  name: talos-0
spec:
  serverRef:
    apiVersion: metal.arges.dev/v1alpha1
    kind: Server
    name: "00000000-0000-0000-0000-d05099d333e0"
    namespace: default
  bmc:
    endpoint: "192.168.1.222"
    user: "admin"
    pass: "******"

Note above that the MetalMachine requires a serverRef that corresponds to a server that has been discovered by the Metal Controller Manager that is a corequisite.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
v1alpha2
Package v1alpha2 contains API Schema definitions for the infrastructure v1alpha2 API group +kubebuilder:object:generate=true +groupName=infrastructure.cluster.x-k8s.io
Package v1alpha2 contains API Schema definitions for the infrastructure v1alpha2 API group +kubebuilder:object:generate=true +groupName=infrastructure.cluster.x-k8s.io
v1alpha3
Package v1alpha3 contains API Schema definitions for the infrastructure v1alpha3 API group +kubebuilder:object:generate=true +groupName=infrastructure.cluster.x-k8s.io
Package v1alpha3 contains API Schema definitions for the infrastructure v1alpha3 API group +kubebuilder:object:generate=true +groupName=infrastructure.cluster.x-k8s.io
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL