This setup will create a kubedns instance that exposes Kubernetes service mappings for DNS across Kubernetes clusters. The use case for this setup is where you have multiple clusters one of which hosts headless services shared with the other clusters, e.g. a shared database or control plane and the shared service is discovered using Kubernetes DNS mappings.
Caveats: ILB cannot share the same IP between the UDP and TCP DNS services, meaning this will be limited to UDP-based name resolution.
- Setup external KubeDNS server, configured with domain set to your stub domain (“my.stub” in the example.): yaml.
- Expose external KubeDNS as an ILB service: yaml.
- Expose any services that need to have cross cluster DNS mappings as a headless service. yaml
- Set the stub domain (e.g. “my.stub”) to point to the ILB. yaml