The Lighthouse project provides DNS discovery for Kubernetes clusters connected by Submariner in multi-cluster environments. Lighthouse implements the Kubernetes Multi-Cluster Service APIs.
The below diagram shows the basic Lighthouse architecture:
The Lighthouse Agent runs in every cluster and accesses the Kubernetes API server running in the Broker cluster to exchange service metadata information with other clusters. Local Service information is exported to the Broker and Service information from other clusters is imported.
The workflow is as follows:
The Lighthouse DNS server runs as an external DNS server which owns the domain clusterset.local
.
CoreDNS is configured to forward any request sent to clusterset.local
to the Lighthouse DNS server,
which uses the ServiceImport and EndpointSlice resources that are distributed by the controller to build an address cache
for DNS resolution. The Lighthouse DNS server supports queries using an A record and an SRV record.
When a single Service is deployed to multiple clusters, Lighthouse DNS server prefers the local cluster first before routing the traffic to other remote clusters in a round-robin fashion.
The workflow is as follows:
clusterset.local
.