Skip to main content

Access your cluster through a domain

Getting Started with Domain Access#

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.

Note

Syself Autopilot does not manage the lifecycle of this Load Balancer, only the addition/removal of targets.

If you delete the cluster, the Load Balancer will remain active on Hetzner.

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:

		$ dig your.domain.your-company.com
	

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.yamlyaml
		apiVersion: cluster.x-k8s.io/v1beta2
kind: Cluster
metadata:
  name: mycluster
spec:
  topology:
    classRef:
      name: hetzner-apalla-1-35-v4
    version: 1.35
    controlPlane:
      replicas: 3
    workers:
      machineDeployments:
        - class: workeramd64hcloud
          name: md-0
          replicas: 1
          failureDomain: nbg1
          variables:
            overrides:
              - name: workerMachineTypeHcloud
                value: cpx42
    variables:
      - name: region
        value: nbg1
      - name: controlPlaneMachineTypeHcloud
        value: cpx42
      - name: clusterEndpointHost
        value: "your.domain.your-company.com"
      - name: clusterLoadBalancerType
        value: "lb11"
      - name: clusterLoadBalancerName
        value: "tutorial-lb"
	
Note

It is not possible to change the domain name of a provisioned cluster.