Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace kube-dns with CoreDNS #261

Merged
merged 1 commit into from
Jul 3, 2018
Merged

Replace kube-dns with CoreDNS #261

merged 1 commit into from
Jul 3, 2018

Conversation

dghubble
Copy link
Member

@dghubble dghubble commented Jul 2, 2018

Note: CoreDNS does not use a pod nanny. For large clusters (100+ nodes), either increase the replica count by hand or use a horizontal autoscaling addon https://kubernetes.io/docs/tasks/administer-cluster/dns-horizontal-autoscaling/

Testing

Switched AWs, GCP, bare-metal, and DO clusters to v1.11.0 with this PR to use CoreDNS.

Workloads have been unaffected across environments. I did discover an incorrect dnsPolicy: Default in one of my manifests for an application that expects to interact with headless service cluster.local pods. Most applications (including the one I found) should leave dnsPolicy unset to get the default ClusterFirst. CoreDNS seems to be in the right.

You can verify basic behaviors by running a debug pod (I used fedora).

$ cat /etc/resolv.conf
nameserver 10.3.0.10
search default.svc.cluster.local svc.cluster.local cluster.local us-west-2.compute.internal
options ndots:5
$ dig kubernetes.default.svc.cluster.local +noall +answer

; <<>> DiG 9.11.3-RedHat-9.11.3-12.fc28 <<>> kubernetes.default.svc.cluster.local +noall +answer
;; global options: +cmd
kubernetes.default.svc.cluster.local. 5 IN A    10.3.0.1
$ dig ptr 1.0.3.10.in-addr.arpa. +noall +answer

; <<>> DiG 9.11.3-RedHat-9.11.3-12.fc28curl <<>> ptr 1.0.3.10.in-addr.arpa. +noall +answer
;; global options: +cmd
1.0.3.10.in-addr.arpa.  5       IN      PTR     kubernetes.default.svc.cluster.local.
curl -k https://kubernetes
curl -k https://kubernetes.default
curl -k https://kubernetes.default.svc.cluster.local

On all platforms, the upstream DNS resolver is inherited from the host /etc/resolv.conf. That means on AWS, you'll use AWS DNS servers. On Google, you'll use Google Cloud's DNS servers.

@dghubble dghubble changed the title Switch from kube-dns to CoreDNS Replace kube-dns with CoreDNS Jul 2, 2018
* Add system:coredns ClusterRole and binding
* Annotate CoreDNS for Prometheus metrics scraping
* Remove kube-dns deployment, service, & service account
* poseidon/terraform-render-bootstrap#71
* https://kubernetes.io/blog/2018/06/27/kubernetes-1.11-release-announcement/
@dghubble dghubble merged commit 6f958d7 into master Jul 3, 2018
@dghubble dghubble deleted the coredns branch July 3, 2018 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant