To configure Kommander to use a custom domain, the domain name must be provided in an installation config file. For example, to use the domain, create the following file:

kind: Installation
clusterHostname: <>

This configuration can be used when installing or reconfiguring Kommander by passing it to the dkp install kommander command:

dkp install kommander --installer-config <config_file.yaml>

To ensure Kommander is installed on the right cluster, use the --kubeconfig=cluster_name.conf flag as an alternative to KUBECONFIG.

After the command completes, obtain the cluster ingress IP address or hostname using the following command:

kubectl -n kommander get svc kommander-traefik -o go-template='{{with index .status.loadBalancer.ingress 0}}{{or .hostname .ip}}{{end}}{{ "\n"}}'

Next, create a DNS record (for example, by using external-dns) for your custom hostname that resolves to the cluster ingress load balancer hostname or IP address. If the previous command returns a hostname, you should create a CNAME DNS entry that resolves to that hostname. If the cluster ingress is an IP address, create a DNS A record.

The domain must be resolvable from the client (your browser) and from the cluster. If you set up an external-dns service, it will take care of pointing the DNS record to the ingress of the cluster automatically. If you are manually creating a DNS record, you have to install Kommander first to obtain the load balancer address required for the DNS record. The Configure a Custom Certificate page contains more details and examples on how and when to set up the DNS record.

Next Topic:

Configure a Custom Certificate