@@ -6,11 +6,8 @@ min-kubernetes-server-version: v1.9
6
6
content_template : templates/task
7
7
---
8
8
9
- {{< feature-state state="beta" >}}
10
-
11
9
{{% capture overview %}}
12
- This page describes how to enable CoreDNS instead of kube-dns for service
13
- discovery.
10
+ This page describes the CoreDNS upgrade process and how to install kube-dns instead of CoreDNS.
14
11
{{% /capture %}}
15
12
16
13
{{% capture prerequisites %}}
@@ -19,41 +16,34 @@ discovery.
19
16
20
17
{{% capture steps %}}
21
18
22
- ## Installing CoreDNS with kubeadm
23
-
24
- In Kubernetes 1.9, [ CoreDNS] ( https://coredns.io ) is available as an alpha feature, and
25
- in Kubernetes 1.10 it is available as a beta feature. In either case, you may install
26
- it during cluster creation by setting the ` CoreDNS ` feature gate to ` true ` during ` kubeadm init ` :
19
+ ## Installing kube-dns with kubeadm
27
20
21
+ In Kubernetes 1.11, [ CoreDNS] ( https://coredns.io ) has graduated to General Availability (GA)
22
+ and is installed by default. To install kube-dns instead, set the ` CoreDNS ` feature gate
23
+ value to ` false ` :
28
24
```
29
- kubeadm init --feature-gates=CoreDNS=true
30
- ```
31
-
32
- This installs CoreDNS instead of kube-dns.
33
-
34
- ## Using a custom CoreDNS image repository with kubeadm
35
-
36
- To use a custom image repository for the CoreDNS image, e.g. one located in your own Docker registry,
37
- you can execute the following command after kubeadm has deployed the CoreDNS manifest:
38
-
39
- ``` shell
40
- kubectl set image -n kube-system deploy/coredns coredns=prefix.example.com/coredns/coredns:1.0.6
25
+ kubeadm init --feature-gates=CoreDNS=false
41
26
```
42
27
43
28
## Upgrading an Existing Cluster with kubeadm
44
29
45
- In Kubernetes 1.10, you can also move to CoreDNS when you use ` kubeadm ` to upgrade
30
+ In Kubernetes version 1.10 and later , you can also move to CoreDNS when you use ` kubeadm ` to upgrade
46
31
a cluster that is using ` kube-dns ` . In this case, ` kubeadm ` will generate the CoreDNS configuration
47
32
("Corefile") based upon the ` kube-dns ` ConfigMap, preserving configurations for federation,
48
33
stub domains, and upstream name server.
49
34
50
- Note that if you are running CoreDNS in your cluster already, prior to upgrade, your existing Corefile will be
51
- ** overwritten** by the one created during upgrade. ** You should save your existing ConfigMap
52
- if you have customized it.** You may re-apply your customizations after the new ConfigMap is
53
- up and running.
35
+ If you are moving from kube-dns to CoreDNS, make sure to set the ` CoreDNS ` feature gate to ` true `
36
+ during an upgrade. For example, here is what a ` v1.11.0 ` upgrade would look like:
37
+ ```
38
+ kubeadm upgrade apply v1.11.0 --feature-gates=CoreDNS=true
39
+ ```
40
+
41
+ In versions prior to 1.11 the Corefile will be ** overwritten** by the one created during upgrade.
42
+ ** You should save your existing ConfigMap if you have customized it.** You may re-apply your
43
+ customizations after the new ConfigMap is up and running.
54
44
55
- This process will be modified for the GA release of this feature, such that an existing
56
- Corefile will not be overwritten .
45
+ If you are running CoreDNS in Kubernetes version 1.11 and later, during upgrade,
46
+ your existing Corefile will be retained .
57
47
58
48
{{% /capture %}}
59
49
0 commit comments