Skip to content

Instantly share code, notes, and snippets.

@kometchtech
Last active January 4, 2018 05:40
Show Gist options
  • Save kometchtech/bb54b4aca4a174a4678b3f39214dc43b to your computer and use it in GitHub Desktop.
Save kometchtech/bb54b4aca4a174a4678b3f39214dc43b to your computer and use it in GitHub Desktop.
sample file for coreDNS
[Unit]
Description=CoreDNS DNS server
Documentation=https://coredns.io
After=network.target
[Service]
PermissionsStartOnly=true
LimitNOFILE=1048576
LimitNPROC=512
#CapabilityBoundingSet=CAP_NET_BIND_SERVICE
#AmbientCapabilities=CAP_NET_BIND_SERVICE
NoNewPrivileges=true
#User=coredns
#WorkingDirectory=~
ExecStart=/usr/bin/coredns -conf=/etc/coredns/Corefile -pidfile=/var/run/coredns.pid
ExecReload=/bin/kill -SIGUSR1 $MAINPID
Restart=on-failure
[Install]
WantedBy=multi-user.target
.:9853 {
errors
# log . {
# class error
# }
cache {
prefetch 10000 1m 50%
}
loadbalance round_robin
proxy . /etc/coredns/nameservers.conf {
protocol dns
policy random
spray
}
# forward . /etc/coredns/root_servers.conf {
# forward . /etc/coredns/nameservers_jp.conf {
# forward . 9.9.9.9 9.9.9.10 {
# forward . /etc/coredns/nameservers.conf {
# max_fails 2
# health_check 10s
# }
}
@kometchtech
Copy link
Author

ipv6対応は、2018年12月のアップデート待ちのk8sの公開のあと?
pluginのforwardは1.0.1には同梱されていない。

@kometchtech
Copy link
Author

serviceファイルが公式に用意されていたので、それを若干修正

@kometchtech
Copy link
Author

  • v1.0.2でもIPv6対応はなし。
  • forwardで指定できるファイルの中身は4Serverまでに制限された模様

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment