Access your cluster through a domain


Using a domain name is a straightforward way to assign meaningful names to your clusters, making them easier to identify and access.

This guide will help you set up and access your cluster through a domain.

Load Balancer and DNS

If you don't already have a domain name, you will need to purchase one.

Access the Hetzner console and create a Load Balancer in your project, removing the default service and giving it a meaningful name. Copy the IPv4 that was assigned to it.

The three available Load Balancer types are lb11 , lb21 and lb31 :

Type Max concurrent connections Services Targets Certificates
lb11 10000 5 25 10
lb21 20000 15 75 25
lb31 40000 30 150 50

Possible values are least_connections and round_robin . If this variable is omitted, the default is round_robin .

Next, access your domain name registrar's dashboard and create an A record pointing to the Load Balancer IPv4. There is no need to create an AAAA record pointing to the LB's IPv6 since we are only using IPv4 in the cluster.

The DNS propagation can take up to 24 hours. If you want to check, you can use dig:

The last step is to add the domain and Load Balancer name and type to the Cluster resource. Add the following items in spec.topology.variables :

cluster.yaml yaml
apiVersion: kind: Cluster metadata: name: mycluster spec: topology: class: hetzner-apalla-1-29-v4 version: {% $clusterstack.kubernetes.ccurrent %} controlPlane: replicas: 3 workers: machineDeployments: - class: workeramd64hcloud name: md-0 replicas: 1 failureDomain: nbg1 variables: overrides: - name: workerMachineTypeHcloud value: cx31 variables: - name: region value: nbg1 - name: controlPlaneMachineTypeHcloud value: cx31 - name: clusterEndpointHost // [!code focus] // [!code domain goes here] value: '' // [!code focus] // [!code tooltip:lb11:1:Type you selected on Load Balancer creation] - name: clusterLoadBalancerType // [!code focus] value: 'lb11' // [!code focus] // [!code tooltip:tutorial-lb:1:The name you gave to your Load Balancer] - name: clusterLoadBalancerName // [!code focus] value: 'tutorial-lb' // [!code focus]

Optionally, you can set the Load Balancer algorithm with the clusterLoadBalancerAlgorithm variable:

- name: clusterLoadBalancerAlgorithm value: "least_connections"
OIDC configuration for your cluster
Using specific Cluster Stack versions