Setup CoreDNS w/ etcd backend
[CoreDNS][coredns] was designed from the ground up to provide robust, plugin-based DNS server for use in cloud environments. Namely, it serves as the default primary service discovery mechanism for Kubernetes.
Using CoreDNS allows us to have a lightweight DNS server on RockNSM (11 Mb binary is all that's needed!) to facilitate multi-node service discovery. Alternatively, if another existing DNS service is available, this can be used instead. Aligning with the way the Kubernetes manages service discovery also allows us to build new RockNSM features in parallel with the coming Kubernetes support.
Once the service is available, the goal is to dynamically update the backend of CoreDNS with the SRV records for the infrastructure services needed within RockNSM.
The CoreDNS backend we will use for this is
etcd is a key-value store developed by CoreOS (no relation to CoreDNS) to provide a highly reliable cluster datastore.
Ansible has an
etcd3 module that will allow us to programmatically set these records. CoreDNS will dynamically be able to serve DNS with these updated values.
Follow the accompanying script file to get a basic DNS service running. [coredns]: https://coredns.io