Skip to main content

HetznerCluster

In HetznerCluster you can define everything related to the general components of the cluster as well as those properties, which are valid cluster-wide.

There are two different modes for the cluster. A pure HCloud cluster and a cluster that uses Hetzner dedicated (bare metal) servers, either as control planes or as workers.

The HCloud cluster works with Kubeadm and supports private networks.

In a cluster that includes bare metal servers there are no private networks, as this feature has not yet been integrated in cluster-api-provider-hetzner. Apart from SSH, the node image has to support cloud-init, which we use to provision the bare metal machines.

Note

In clusters with bare metal servers, you need to use this CCM, as the official one does not support bare metal.

you can find more information regarding the handling of SSH keys. Some of them are specified in HetznerCluster to have them cluster-wide, others are machine-scoped.

Usage without HCloud Load Balancer#

It is also possible not to use the cloud load balancer from Hetzner. This is useful for setups with only one control plane, or if you have your own cloud load balancer.

Using controlPlaneLoadBalancer.enabled=false prevents the creation of a hcloud load balancer. Then you need to configure controlPlaneEndpoint.port=6443 & controlPlaneEndpoint.host, which should be a domain that has A records configured pointing to the control plane IP for example.

If you are using your own load balancer, you need to point towards it and configure the load balancer to target the control planes of the cluster.

Overview of HetznerCluster.Spec#

hcloudNetwork
type: object

Specifies details about Hetzner cloud private networks.

controlPlaneRegions
type: []string
This is the base for the failureDomains of the cluster.
default: []string{fsn1}
sshKeys
type: object

Cluster-wide SSH keys that serve as default for machines as well.

controlPlaneEndpoint
type: object

Set by the controller. It is the endpoint to communicate with the control plane.

controlPlaneLoadBalancer
type: object

Defines specs of load balancer.

required
hcloudPlacementGroups
type: []object

List of placement groups that should be defined in Hetzner API.

hetznerSecret
type: object

Reference to secret where Hetzner API credentials are stored.

required
skipCreatingHetznerSecretInWorkloadCluster
type: bool
Indicates whether the Hetzner secret should be created in the workload cluster. By default the secret gets created, so that the ccm (running in the wl-cluster) can use that secret. If you prefer to not reveal the secret in the wl-cluster, you can set this to value to false, so that the secret is not created. Be sure to run the ccm outside of the wl-cluster in that case, e.g. in the management cluster.
default: false