Stellar CoreDNS Plugin
This is a CoreDNS Plugin that resolves queries
for applications and services running in a Stellar
system.
Build
See the CoreDNS docs on how
to build a CoreDNS version with an external plugin using this repository.
Configuration and Usage
To use the plugin, specify a CoreDNS configuration similar to the following:
stellar.local {
log
debug
stellar <stellar-server-address:8080> {
fallthrough
}
}
Replace stellar.local
with whatever domain you want to resolve as and <stellar-server-address>
with the address of one of your Stellar servers.
With an application deployed, you can query all services by just using the application name. For
example, if the application is named nginx-example
you can dig nginx-example.stellar.local
and get something similar to this:
;; ANSWER SECTION:
nginx.nginx-example.stellar.local. 0 IN A 10.10.228.101
nginx.nginx-example.stellar.local. 0 IN A 10.10.228.102
cache.nginx-example.stellar.local. 0 IN A 10.10.228.103
cache.nginx-example.stellar.local. 0 IN A 10.10.228.104
You can also query an individual service by specifying the service name as a prefix. For example,
to query for the service nginx
in the application nginx-example
you can dig nginx.nginx-example.stellar.local
and get something like:
;; ANSWER SECTION:
nginx.nginx-example.stellar.local. 0 IN A 10.10.228.101
nginx.nginx-example.stellar.local. 0 IN A 10.10.228.102