- add
- list
- update
- delete
To connect to the SkyDNS HTTP endpoint for issuing commands set the environment
variable SKYDNS
or you can run the cli app with the --host
flag.
export SKYDNS="http://localhost:8080"
# OR
skydnsctl --host "http://localhost:8080"
For the DNS discovery port 53 is assumed on the URL mentioned in --host
or in
the SKYDNS environment variable. This can overrulled with --dnsport
or the environment
variable SKYDNS_DNSPORT.
The default domain used for DNS queries is skydns.local
, but this can be overruled with the
environment variable SKYDNS_DNSDOMAIN or the option --dnsdomain
.
skydnsctl add 1001 '{"Name":"TestService","Version":"1.0.0","Environment":"Production","Region":"Test","Host":"web
1.site.com","Port":9000,"TTL":1000}'
1001 added to skydns
skydnsctl 1001
UUID: 1001
Name: TestService
Host: web1.site.com
Port: 9000
Environment: Production
Region: Test
Version: 1.0.0
TTL 492
Remaining TTL: 492
skydnsctl
UUID: 1004
Name: TestService
Host: web4.site.com
Port: 80
Environment: Production
Region: West
Version: 1.0.0
TTL 141
Remaining TTL: 141
----
skydnsctl --json 1001
{"UUID":"1001","Name":"TestService","Version":"1.0.0","Environment":"Production","Region":"Test","Host":"web1.site.com","Port":9000,"TTL":987,"Expires":"2014-01-17T23:09:19.827085688-08:00"}
skydnsctl update 1001 3000
1001 ttl updated to 3000
skydnsctl delete 1001
1001 removed from skydns