talira

Cluster API Provider Hetzner

Manage Kubernetes clusters on Hetzner, fully declarative, Kubernetes-native and with self-healing

open sourceApache-2.0self-hostablefree

Cluster API Provider Hetzner (CAPH) is the Cluster API infrastructure provider for Hetzner Cloud servers and Hetzner's bare metal (Robot) servers, maintained by Syself and the community; it isn't an official Hetzner project. It adds custom resources such as HetznerCluster, HCloudMachineTemplate and HetznerBareMetalHost, so a management cluster (often a local kind cluster at first) creates, heals and upgrades kubeadm-based workload clusters, with control planes on cloud or bare metal. Nodes boot from an image you supply with a container runtime, kubelet and kubeadm, such as a Hetzner snapshot built with Packer. Its remediation templates reboot an unhealthy machine before Cluster API replaces it, and a CSR controller signs kubelet serving certificates. Syself sells Syself Autopilot as the managed version.

Problems it solves

  • run self-managed Kubernetes on Hetzner Cloud with every cluster defined as Kubernetes objects
  • use Hetzner dedicated bare metal servers as Kubernetes control plane and worker nodes
  • put the control plane on Hetzner Cloud VMs and the workers on bare metal in one Kubernetes cluster
  • automatically reboot, and then replace, a Hetzner server whose Kubernetes node stops responding
  • replace a dead control plane node on Hetzner without rebuilding the cluster by hand
  • provision the Hetzner servers behind our Kubernetes clusters from a GitOps repo instead of the console
  • boot Kubernetes nodes on Hetzner from my own hardened snapshot image
  • install my own OS image on Hetzner Robot machines automatically when they join a Kubernetes cluster
  • get kubelet serving certificates signed on Hetzner nodes so metrics-server can run securely
  • reuse a fixed set of Hetzner servers on a favourable plan when a Kubernetes node pool scales, instead of creating new ones
  • keep fixed node names on Hetzner bare metal so local storage survives reprovisioning
  • run several Kubernetes clusters in the same Hetzner Cloud project without them stepping on each other
  • upgrade the Kubernetes version of clusters on Hetzner by rolling out fresh machines

Features

  • Hetzner Cloud servers and Hetzner Robot bare metal servers as Cluster API Machines
  • Bare metal flavors: bare metal control planes and workers, or HCloud control planes with bare metal workers
  • HCloudRemediationTemplate and HetznerBareMetalRemediationTemplate: reboot an unhealthy machine (retry limit and timeout) before it's replaced
  • Skips the reboot and replaces the machine right away when its Node is already gone
  • Node images from Hetzner snapshots (built by hand, with Packer or via the API), selected by name or label; bare metal via installimage and an image URL or OCI artifact
  • CSR controller that checks DNS names and IPs before approving kubelet serving certificates
  • Server recycling: reuse labelled existing Hetzner Cloud servers, rebuilt with the machine's bootstrap data
  • Constant hostnames for bare metal servers
  • Multi-tenancy: several clusters in one Hetzner Cloud project, kept apart by labels
  • Backs off per object when Hetzner Cloud or Robot rate limits are hit
View 2 more
  • Installed with clusterctl init --infrastructure hetzner; flavors generated with clusterctl generate cluster
  • Syncs the hcloud token secret into the workload cluster for Syself's or Hetzner's cloud controller manager

Limitations

  • Doesn't buy Hetzner dedicated servers for you: bare metal servers must be purchased manually in Hetzner Robot before a cluster can use them1
  • Doesn't ship production node images: you build one with a container runtime, kubelet and kubeadm (e.g. a Packer snapshot) or install them at boot23

Capabilities

Has an APIplan not known

Alternatives

The same job

These do what Cluster API Provider Hetzner does.

  1. kube-hetzner Optimized and maintenance-free Kubernetes on Hetzner Cloud in one command
  2. hetzner-k3s The easiest and fastest way to create production-ready Kubernetes clusters on Hetzner Cloud
  3. Cloudfleet Managed Kubernetes from datacenter to cloud to edge
  4. Syself Autopilot Fully managed Kubernetes on your own Hetzner servers
  5. kOps The easiest way to get a production grade Kubernetes cluster up and running

Compare Cluster API Provider Hetzner with the top 3