diff --git a/cluster/addons/dns/coredns/coredns.yaml.base b/cluster/addons/dns/coredns/coredns.yaml.base index 0d969b261b..b6774713e0 100644 --- a/cluster/addons/dns/coredns/coredns.yaml.base +++ b/cluster/addons/dns/coredns/coredns.yaml.base @@ -66,7 +66,9 @@ data: prometheus :9153 proxy . /etc/resolv.conf cache 30 + loop reload + loadbalance } --- apiVersion: extensions/v1beta1 @@ -106,7 +108,7 @@ spec: operator: "Exists" containers: - name: coredns - image: k8s.gcr.io/coredns:1.1.3 + image: k8s.gcr.io/coredns:1.2.2 imagePullPolicy: IfNotPresent resources: limits: diff --git a/cluster/addons/dns/coredns/coredns.yaml.in b/cluster/addons/dns/coredns/coredns.yaml.in index 4013807f6c..7beb3769c3 100644 --- a/cluster/addons/dns/coredns/coredns.yaml.in +++ b/cluster/addons/dns/coredns/coredns.yaml.in @@ -66,7 +66,9 @@ data: prometheus :9153 proxy . /etc/resolv.conf cache 30 + loop reload + loadbalance } --- apiVersion: extensions/v1beta1 @@ -106,7 +108,7 @@ spec: operator: "Exists" containers: - name: coredns - image: k8s.gcr.io/coredns:1.1.3 + image: k8s.gcr.io/coredns:1.2.2 imagePullPolicy: IfNotPresent resources: limits: diff --git a/cluster/addons/dns/coredns/coredns.yaml.sed b/cluster/addons/dns/coredns/coredns.yaml.sed index f29d6e68c7..4f0dc10a10 100644 --- a/cluster/addons/dns/coredns/coredns.yaml.sed +++ b/cluster/addons/dns/coredns/coredns.yaml.sed @@ -66,7 +66,9 @@ data: prometheus :9153 proxy . /etc/resolv.conf cache 30 + loop reload + loadbalance } --- apiVersion: extensions/v1beta1 @@ -106,7 +108,7 @@ spec: operator: "Exists" containers: - name: coredns - image: k8s.gcr.io/coredns:1.1.3 + image: k8s.gcr.io/coredns:1.2.2 imagePullPolicy: IfNotPresent resources: limits: diff --git a/cmd/kubeadm/app/constants/constants.go b/cmd/kubeadm/app/constants/constants.go index 7dc5f472df..3176f52cd7 100644 --- a/cmd/kubeadm/app/constants/constants.go +++ b/cmd/kubeadm/app/constants/constants.go @@ -289,7 +289,7 @@ const ( KubeDNSVersion = "1.14.10" // CoreDNSVersion is the version of CoreDNS to be deployed if it is used - CoreDNSVersion = "1.1.3" + CoreDNSVersion = "1.2.2" // ClusterConfigurationKind is the string kind value for the ClusterConfiguration struct ClusterConfigurationKind = "ClusterConfiguration" diff --git a/cmd/kubeadm/app/phases/addons/dns/dns.go b/cmd/kubeadm/app/phases/addons/dns/dns.go index 87b620e876..5480c90c0b 100644 --- a/cmd/kubeadm/app/phases/addons/dns/dns.go +++ b/cmd/kubeadm/app/phases/addons/dns/dns.go @@ -310,6 +310,7 @@ func translateStubDomainOfKubeDNSToProxyCoreDNS(dataField string, kubeDNSConfigM pStanza["body"] = [][]string{ {"errors"}, {"cache", "30"}, + {"loop"}, append([]string{"proxy", "."}, proxyIP...), } proxyStanza = append(proxyStanza, pStanza) diff --git a/cmd/kubeadm/app/phases/addons/dns/dns_test.go b/cmd/kubeadm/app/phases/addons/dns/dns_test.go index d28219ff61..111f444f10 100644 --- a/cmd/kubeadm/app/phases/addons/dns/dns_test.go +++ b/cmd/kubeadm/app/phases/addons/dns/dns_test.go @@ -204,24 +204,28 @@ func TestTranslateStubDomainKubeDNSToCoreDNS(t *testing.T) { foo.com:53 { errors cache 30 + loop proxy . 1.2.3.4:5300 3.3.3.3 } my.cluster.local:53 { errors cache 30 + loop proxy . 2.3.4.5 }`, expectTwo: ` my.cluster.local:53 { errors cache 30 + loop proxy . 2.3.4.5 } foo.com:53 { errors cache 30 + loop proxy . 1.2.3.4:5300 3.3.3.3 }`, }, @@ -251,24 +255,28 @@ func TestTranslateStubDomainKubeDNSToCoreDNS(t *testing.T) { foo.com:53 { errors cache 30 + loop proxy . 1.2.3.4:5300 } my.cluster.local:53 { errors cache 30 + loop proxy . 2.3.4.5 }`, expectTwo: ` my.cluster.local:53 { errors cache 30 + loop proxy . 2.3.4.5 } foo.com:53 { errors cache 30 + loop proxy . 1.2.3.4:5300 }`, }, diff --git a/cmd/kubeadm/app/phases/addons/dns/manifests.go b/cmd/kubeadm/app/phases/addons/dns/manifests.go index 85dff31bf5..1cab230cd8 100644 --- a/cmd/kubeadm/app/phases/addons/dns/manifests.go +++ b/cmd/kubeadm/app/phases/addons/dns/manifests.go @@ -311,7 +311,9 @@ data: prometheus :9153 proxy . {{ .UpstreamNameserver }} cache 30 + loop reload + loadbalance }{{ .StubDomain }} ` // CoreDNSClusterRole is the CoreDNS ClusterRole manifest diff --git a/cmd/kubeadm/app/phases/upgrade/compute_test.go b/cmd/kubeadm/app/phases/upgrade/compute_test.go index ee17ee76a8..b2983d84f3 100644 --- a/cmd/kubeadm/app/phases/upgrade/compute_test.go +++ b/cmd/kubeadm/app/phases/upgrade/compute_test.go @@ -168,7 +168,7 @@ func TestGetAvailableUpgrades(t *testing.T) { KubeVersion: "v1.10.3", KubeadmVersion: "v1.10.3", DNSType: "coredns", - DNSVersion: "1.1.3", + DNSVersion: "1.2.2", EtcdVersion: "3.1.12", }, }, @@ -207,7 +207,7 @@ func TestGetAvailableUpgrades(t *testing.T) { KubeVersion: "v1.10.3", KubeadmVersion: "v1.10.3", DNSType: "coredns", - DNSVersion: "1.1.3", + DNSVersion: "1.2.2", EtcdVersion: "3.1.12", }, }, @@ -246,7 +246,7 @@ func TestGetAvailableUpgrades(t *testing.T) { KubeVersion: "v1.11.0", KubeadmVersion: "v1.11.0", DNSType: "coredns", - DNSVersion: "1.1.3", + DNSVersion: "1.2.2", EtcdVersion: "3.2.18", }, }, @@ -285,7 +285,7 @@ func TestGetAvailableUpgrades(t *testing.T) { KubeVersion: "v1.10.5", KubeadmVersion: "v1.10.5", // Note: The kubeadm version mustn't be "downgraded" here DNSType: "coredns", - DNSVersion: "1.1.3", + DNSVersion: "1.2.2", EtcdVersion: "3.1.12", }, }, @@ -305,7 +305,7 @@ func TestGetAvailableUpgrades(t *testing.T) { KubeVersion: "v1.11.1", KubeadmVersion: "v1.11.1", DNSType: "coredns", - DNSVersion: "1.1.3", + DNSVersion: "1.2.2", EtcdVersion: "3.2.18", }, }, @@ -364,7 +364,7 @@ func TestGetAvailableUpgrades(t *testing.T) { KubeVersion: "v1.11.0-alpha.2", KubeadmVersion: "v1.11.0-alpha.2", DNSType: "coredns", - DNSVersion: "1.1.3", + DNSVersion: "1.2.2", EtcdVersion: "3.2.18", }, }, @@ -404,7 +404,7 @@ func TestGetAvailableUpgrades(t *testing.T) { KubeVersion: "v1.11.0-alpha.2", KubeadmVersion: "v1.11.0-alpha.2", DNSType: "coredns", - DNSVersion: "1.1.3", + DNSVersion: "1.2.2", EtcdVersion: "3.2.18", }, }, @@ -445,7 +445,7 @@ func TestGetAvailableUpgrades(t *testing.T) { KubeVersion: "v1.11.0-beta.1", KubeadmVersion: "v1.11.0-beta.1", DNSType: "coredns", - DNSVersion: "1.1.3", + DNSVersion: "1.2.2", EtcdVersion: "3.2.18", }, }, @@ -486,7 +486,7 @@ func TestGetAvailableUpgrades(t *testing.T) { KubeVersion: "v1.11.0-rc.1", KubeadmVersion: "v1.11.0-rc.1", DNSType: "coredns", - DNSVersion: "1.1.3", + DNSVersion: "1.2.2", EtcdVersion: "3.2.18", }, }, @@ -527,7 +527,7 @@ func TestGetAvailableUpgrades(t *testing.T) { KubeVersion: "v1.11.6-rc.1", KubeadmVersion: "v1.11.6-rc.1", DNSType: "coredns", - DNSVersion: "1.1.3", + DNSVersion: "1.2.2", EtcdVersion: "3.2.18", }, }, @@ -568,7 +568,7 @@ func TestGetAvailableUpgrades(t *testing.T) { KubeVersion: "v1.11.0-rc.1", KubeadmVersion: "v1.11.0-rc.1", DNSType: "coredns", - DNSVersion: "1.1.3", + DNSVersion: "1.2.2", EtcdVersion: "3.2.18", }, }, @@ -588,7 +588,7 @@ func TestGetAvailableUpgrades(t *testing.T) { KubeVersion: "v1.12.0-alpha.2", KubeadmVersion: "v1.12.0-alpha.2", DNSType: "coredns", - DNSVersion: "1.1.3", + DNSVersion: "1.2.2", EtcdVersion: "3.2.18", }, }, @@ -641,7 +641,7 @@ func TestGetAvailableUpgrades(t *testing.T) { KubeVersion: "v1.12.1", KubeadmVersion: "v1.12.1", DNSType: "coredns", - DNSVersion: "1.1.3", + DNSVersion: "1.2.2", EtcdVersion: "3.2.18", }, }, @@ -678,7 +678,7 @@ func TestGetAvailableUpgrades(t *testing.T) { KubeVersion: "v1.12.0", KubeadmVersion: "v1.12.0", DNSType: "coredns", - DNSVersion: "1.1.3", + DNSVersion: "1.2.2", EtcdVersion: "3.2.18", }, },