This is a feature request. Please provide an option to deploy CoreDNS instead of kube-dns. Bonus points for providing a migration path between them.
https://kubernetes.io/docs/tasks/administer-cluster/coredns/
This would be awesome, if included directly into installation.
@superseb can you first add configuration in cluster.yml for a "dns provider", as the monitoring or the ingress one, so we can disable the default kubedns addon and install coredns with a user addon?
Thank you for helping me. I want to understand RKE more and try to deal with core-dns. My codes seems workable. However, they still have some problems. Pls enlighten me on this issue and help me. Thank you very much.



Put some time into this today, and had a first deploy. Hopefully it can make it in the next release as experimental option
@superseb what is the expected timeframe? Anything available for kicking tires?
PR should be up this week
@superseb Great. I have been waiting for it to try it out. How will users know when it becomes available?
@superseb Any update on this?
@pulberg, I'm also interested in this feature. I saw a PR https://github.com/rancher/rke/pull/1018 about this, but seems CI test is failing
We are reviewing it currently, CI is failing due to types not being merged yet (https://github.com/rancher/types/pull/621)
Can be tested in v0.2.0-rc5
Nice with v0.2.0-rc5, it smoothly upgrades, just a small warning but probably a timeout, just less than second after it says deployed successfully
...
INFO[0207] [dns] removing DNS provider kubedns
INFO[0249] [dns] DNS provider kubedns removed successfully
INFO[0249] [addons] Setting up coredns
INFO[0249] [addons] Saving ConfigMap for addon rke-coredns-addon to Kubernetes
INFO[0249] [addons] Successfully saved ConfigMap for addon rke-coredns-addon to Kubernetes
INFO[0249] [addons] Executing deploy job rke-coredns-addon
WARN[0279] Failed to deploy addon execute job [rke-coredns-addon]: Failed to get job complete status for job rke-coredns-addon-deploy-job in namespace kube-system
INFO[0279] [dns] DNS provider coredns deployed successfully
...
$ kubectl get deploy coredns coredns-autoscaler -n kube-system
NAME READY UP-TO-DATE AVAILABLE AGE
coredns 1/1 1 1 3m42s
NAME READY UP-TO-DATE AVAILABLE AGE
coredns-autoscaler 1/1 1 1 3m42s
$ kubectl logs coredns-66599d4bdb-sv6qs -n kube-system
.:53
2019-02-04T16:07:38.913Z [INFO] CoreDNS-1.2.6
2019-02-04T16:07:38.913Z [INFO] linux/amd64, go1.11.2, 756749c
CoreDNS-1.2.6
linux/amd64, go1.11.2, 756749c
[INFO] plugin/reload: Running configuration MD5 = 464baa972bd6ab609ff20cbd7fca9320
verified on rke version v0.2.0-rc5.
coredns is deployed.


Meanwhile of #1106 for the ones, wondering like me what images to swap here is kind of the answer:
what settings should I change in order to switch to coredns? @sdelrio
@ahmadalli I have not used RKE CLI for a couple of months now and I think coredns is now officially supported. If it is, I suggest running “rke config ...” and create a new conf file and choose coredns as the dns option. If not supported officially, then replace kubedns entries in your Conf file with coredns. For which coredns image to use, you may have to do a bit of search. I hope it helps.
@ahmadalli , into rancher-cluster.yml (or the filename that you pass as --config parameter) Add this:
dns:
provider: coredns
Looking on the sourcode you can set it to: kubdns or coredns:
var DNSProviders = []string{"kubedns", "coredns"}
Most helpful comment
Put some time into this today, and had a first deploy. Hopefully it can make it in the next release as experimental option