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.

Here 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

KeyTypeDefaultRequiredDescription
hcloudNetwork object noSpecifies details about Hetzner cloud private networks
hcloudNetwork.enabled bool yesStates whether network should be enabled or disabled
hcloudNetwork.cidrBlock string "10.0.0.0/16" noDefines the CIDR block
hcloudNetwork.subnetCidrBlock string "10.0.0.0/24" noDefines the CIDR block of the subnet. Note that one subnet ist required
hcloudNetwork.networkZone string "eu-central" noDefines the network zone. Must be eu-central, us-east or us-west
controlPlaneRegions []string []string{fsn1} noThis is the base for the failureDomains of the cluster
sshKeys object noCluster-wide SSH keys that serve as default for machines as well
sshKeys.hcloud []object noSSH keys for hcloud
sshKeys.hcloud.name string yesName of SSH key
sshKeys.hcloud.fingerprint string noFingerprint of SSH key - used by the controller
sshKeys.robotRescueSecretRef object noReference to the secret where the SSH key for the rescue system is stored
sshKeys.robotRescueSecretRef.name string yesName of the secret
sshKeys.robotRescueSecretRef.key object yesDetails about the keys used in the data of the secret
sshKeys.robotRescueSecretRef.key.name string yesName is the key in the secret's data where the SSH key's name is stored
sshKeys.robotRescueSecretRef.key.publicKey string yesPublicKey is the key in the secret's data where the SSH key's public key is stored
sshKeys.robotRescueSecretRef.key.privateKey string yesPrivateKey is the key in the secret's data where the SSH key's private key is stored
controlPlaneEndpoint object noSet by the controller. It is the endpoint to communicate with the control plane
controlPlaneEndpoint.host string yesDefines host
controlPlaneEndpoint.port int 32yesDefines port
controlPlaneLoadBalancer object yesDefines specs of load balancer
controlPlaneLoadBalancer.enabled bool true noSpecifies if a load balancer should be created
controlPlaneLoadBalancer.name string noName of load balancer
controlPlaneLoadBalancer.algorithm string round_robin noType of load balancer algorithm. Either round_robin or least_connections
controlPlaneLoadBalancer.type string lb11 noType of load balancer. One of lb11, lb21, lb31
controlPlaneLoadBalancer.port int 6443 noLoad balancer port. Must be in range 1-65535
controlPlaneLoadBalancer.extraServices []object noDefines extra services of load balancer
controlPlaneLoadBalancer.extraServices.protocol string yesDefines protocol. Must be one of https, http, or tcp
controlPlaneLoadBalancer.extraServices.listenPort int yesDefines listen port. Must be in range 1-65535
controlPlaneLoadBalancer.extraServices.destinationPort int yesDefines destination port. Must be in range 1-65535
hcloudPlacementGroup []object noList of placement groups that should be defined in Hetzner API
hcloudPlacementGroup.name string yesName of placement group
hcloudPlacementGroup.type string type noType of placement group. Hetzner only supports 'spread'
hetznerSecret object yesReference to secret where Hetzner API credentials are stored
hetznerSecret.name string yesName of secret
hetznerSecret.key object yesReference to the keys that are used in the secret, either hcloudToken or hetznerRobotUser and hetznerRobotPassword need to be specified
hetznerSecret.key.hcloudToken string noName of the key where the token for the Hetzner Cloud API is stored
hetznerSecret.key.hetznerRobotUser string noName of the key where the username for the Hetzner Robot API is stored
hetznerSecret.key.hetznerRobotPassword string noName of the key where the password for the Hetzner Robot API is stored
Previous
Object Reference
Next
HCloudMachineTemplate