Skip to content

Commit 782d8bc

Browse files
authored
Merge pull request #32126 from tengqm/update-coredns
Improve coredns page
2 parents ff093d8 + 15f643e commit 782d8bc

File tree

1 file changed

+32
-36
lines changed
  • content/en/docs/tasks/administer-cluster

1 file changed

+32
-36
lines changed

content/en/docs/tasks/administer-cluster/coredns.md

Lines changed: 32 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,14 @@ This page describes the CoreDNS upgrade process and how to install CoreDNS inste
1919

2020
## About CoreDNS
2121

22-
[CoreDNS](https://coredns.io) is a flexible, extensible DNS server that can serve as the Kubernetes cluster DNS.
23-
Like Kubernetes, the CoreDNS project is hosted by the {{< glossary_tooltip text="CNCF" term_id="cncf" >}}.
22+
[CoreDNS](https://coredns.io) is a flexible, extensible DNS server
23+
that can serve as the Kubernetes cluster DNS.
24+
Like Kubernetes, the CoreDNS project is hosted by the
25+
{{< glossary_tooltip text="CNCF" term_id="cncf" >}}.
2426

25-
You can use CoreDNS instead of kube-dns in your cluster by replacing kube-dns in an existing
26-
deployment, or by using tools like kubeadm that will deploy and upgrade the cluster for you.
27+
You can use CoreDNS instead of kube-dns in your cluster by replacing
28+
kube-dns in an existing deployment, or by using tools like kubeadm
29+
that will deploy and upgrade the cluster for you.
2730

2831
## Installing CoreDNS
2932

@@ -34,51 +37,44 @@ For manual deployment or replacement of kube-dns, see the documentation at the
3437

3538
### Upgrading an existing cluster with kubeadm
3639

37-
In Kubernetes version 1.10 and later, you can also move to CoreDNS when you use `kubeadm` to upgrade
38-
a cluster that is using `kube-dns`. In this case, `kubeadm` will generate the CoreDNS configuration
40+
In Kubernetes version 1.21, kubeadm removed its support for `kube-dns` as a DNS application.
41+
For `kubeadm` v{{< skew currentVersion >}}, the only supported cluster DNS application
42+
is CoreDNS.
43+
44+
You can move to CoreDNS when you use `kubeadm` to upgrade a cluster that is
45+
using `kube-dns`. In this case, `kubeadm` generates the CoreDNS configuration
3946
("Corefile") based upon the `kube-dns` ConfigMap, preserving configurations for
4047
stub domains, and upstream name server.
4148

42-
If you are moving from kube-dns to CoreDNS, make sure to set the `CoreDNS` feature gate to `true`
43-
during an upgrade. For example, here is what a `v1.11.0` upgrade would look like:
44-
```
45-
kubeadm upgrade apply v1.11.0 --feature-gates=CoreDNS=true
46-
```
47-
48-
In Kubernetes version 1.13 and later the `CoreDNS` feature gate is removed and CoreDNS
49-
is used by default.
50-
51-
In versions prior to 1.11 the Corefile will be **overwritten** by the one created during upgrade.
52-
**You should save your existing ConfigMap if you have customized it.** You may re-apply your
53-
customizations after the new ConfigMap is up and running.
54-
55-
If you are running CoreDNS in Kubernetes version 1.11 and later, during upgrade,
56-
your existing Corefile will be retained.
49+
## Upgrading CoreDNS
5750

58-
In Kubernetes version 1.21, support for `kube-dns` is removed from kubeadm.
51+
You can check the version of CoreDNS that kubeadm installs for each version of
52+
Kubernetes in the page
53+
[CoreDNS version in Kubernetes](https://github.com/coredns/deployment/blob/master/kubernetes/CoreDNS-k8s_version.md).
5954

60-
## Upgrading CoreDNS
55+
CoreDNS can be upgraded manually in case you want to only upgrade CoreDNS
56+
or use your own custom image.
57+
There is a helpful [guideline and walkthrough](https://github.com/coredns/deployment/blob/master/kubernetes/Upgrading_CoreDNS.md)
58+
available to ensure a smooth upgrade.
59+
Make sure the existing CoreDNS configuration ("Corefile") is retained when
60+
upgrading your cluster.
6161

62-
CoreDNS is available in Kubernetes since v1.9.
63-
You can check the version of CoreDNS shipped with Kubernetes and the changes made to CoreDNS [here](https://github.com/coredns/deployment/blob/master/kubernetes/CoreDNS-k8s_version.md).
62+
If you are upgrading your cluster using the `kubeadm` tool, `kubeadm`
63+
can take care of retaining the existing CoreDNS configuration automatically.
6464

65-
CoreDNS can be upgraded manually in case you want to only upgrade CoreDNS or use your own custom image.
66-
There is a helpful [guideline and walkthrough](https://github.com/coredns/deployment/blob/master/kubernetes/Upgrading_CoreDNS.md) available to ensure a smooth upgrade.
6765

6866
## Tuning CoreDNS
6967

70-
When resource utilisation is a concern, it may be useful to tune the configuration of CoreDNS. For more details, check out the
68+
When resource utilisation is a concern, it may be useful to tune the
69+
configuration of CoreDNS. For more details, check out the
7170
[documentation on scaling CoreDNS](https://github.com/coredns/deployment/blob/master/kubernetes/Scaling_CoreDNS.md).
7271

73-
74-
7572
## {{% heading "whatsnext" %}}
7673

77-
7874
You can configure [CoreDNS](https://coredns.io) to support many more use cases than
79-
kube-dns by modifying the `Corefile`. For more information, see the
80-
[CoreDNS site](https://coredns.io/2017/05/08/custom-dns-entries-for-kubernetes/).
81-
82-
83-
75+
kube-dns does by modifying the CoreDNS configuration ("Corefile").
76+
For more information, see the [documentation](https://coredns.io/plugins/kubernetes/)
77+
for the `kubernetes` CoreDNS plugin, or read the
78+
[Custom DNS Entries for Kubernetes](https://coredns.io/2017/05/08/custom-dns-entries-for-kubernetes/).
79+
in the CoreDNS blog.
8480

0 commit comments

Comments
 (0)