Skip to content

mirisu2/coredns-nsip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

coredns-nsip

Corefile

foo.bar:1053 {
    loop
    log
    nsip {
        ns1 192.168.1.100
        ns2 192.168.2.101
    }
    forward . /etc/resolv.conf
}
foo.baz:1053 {
    log
    nsip {
        ns1 192.168.2.102
    }
    errors
}

kubernetes

$ kubectl -n ns1 exec -it nginx -- bash
root@nginx:/# curl -v a.foo.bar
*   Trying 192.168.1.100:80...

$ kubectl -n ns2 exec -it nginx -- bash
root@nginx:/# curl -v a.foo.bar
*   Trying 192.168.1.101:80...

Coredns rebuild

$ git clone https://github.com/coredns/coredns.git
$ cd coredns
# configure Corefile
$ vim Corefile

(!) IT IS IMPORTANT TO NOTE THE ORDER OF PLUGINS
$ cat plugin.cfg
nsip:github.com/mirisu2/coredns-nsip
forward:forward

$ GOPROXY=direct go get github.com/mirisu2/coredns-nsip
$ make
$ docker build --network host -t dockeruser/coredns:nsip .
$ docker push dockeruser/coredns:nsip

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages