Configure a Custom Domain without a Custom Certificate
To configure Kommander to use a custom domain, the domain name must be provided in an installation config file. If you want to set up a custom domain and certificate, refer to Configure the Kommander Installation with a Custom Domain and Certificate.
Open the Kommander Installer Configuration File or
<kommander.yaml>
file:If you do not have the
<kommander.yaml>
file, initialize the configuration file, so you can edit it in the following steps. WARNING: Initialize this file only ONCE, otherwise you will overwrite previous customizations.If you have initialized the configuration file already, open the
<kommander.yaml>
with the editor of your choice.
In that file, configure the custom domain for your cluster by adding this line:
CODE[...] clusterHostname: <mycluster.example.com> [...]
This configuration can be used when installing or reconfiguring Kommander by passing it to the
dkp install kommander
command:CODEdkp install kommander --installer-config <kommander.yaml> --kubeconfig=${CLUSTER_NAME}.conf
Note: 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:
CODEkubectl -n kommander get svc kommander-traefik -o go-template='{{with index .status.loadBalancer.ingress 0}}{{or .hostname .ip}}{{end}}{{ "\n"}}'
If required, 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.
Related topics:
Why to set up a Custom Domain or Certificate?
Configure the Kommander Installation with a Custom Domain and Certificate