diff --git a/cmd/kubeadm/app/constants/constants.go b/cmd/kubeadm/app/constants/constants.go index 98047f529de..2e519e82839 100644 --- a/cmd/kubeadm/app/constants/constants.go +++ b/cmd/kubeadm/app/constants/constants.go @@ -319,7 +319,7 @@ const ( KubeletHealthzPort = 10248 // MinExternalEtcdVersion indicates minimum external etcd version which kubeadm supports - MinExternalEtcdVersion = "3.4.13-4" + MinExternalEtcdVersion = "3.5.11-0" // DefaultEtcdVersion indicates the default etcd version that kubeadm uses DefaultEtcdVersion = "3.5.13-0" @@ -481,13 +481,6 @@ var ( // SupportedEtcdVersion lists officially supported etcd versions with corresponding Kubernetes releases SupportedEtcdVersion = map[uint8]string{ - 22: "3.5.13-0", - 23: "3.5.13-0", - 24: "3.5.13-0", - 25: "3.5.13-0", - 26: "3.5.13-0", - 27: "3.5.13-0", - 28: "3.5.13-0", 29: "3.5.13-0", 30: "3.5.13-0", 31: "3.5.13-0", diff --git a/cmd/kubeadm/app/constants/constants_test.go b/cmd/kubeadm/app/constants/constants_test.go index 505a7572e67..819fd3f804d 100644 --- a/cmd/kubeadm/app/constants/constants_test.go +++ b/cmd/kubeadm/app/constants/constants_test.go @@ -124,11 +124,15 @@ func TestGetStaticPodFilepath(t *testing.T) { } } +func TestEtcdSupportedVersionLength(t *testing.T) { + const max = 3 + if len(SupportedEtcdVersion) > max { + t.Fatalf("SupportedEtcdVersion must not include more than %d versions", max) + } +} + func TestEtcdSupportedVersion(t *testing.T) { var supportedEtcdVersion = map[uint8]string{ - 13: "3.2.24", - 14: "3.3.10", - 15: "3.3.10", 16: "3.3.17-0", 17: "3.4.3-0", 18: "3.4.3-0", @@ -147,7 +151,7 @@ func TestEtcdSupportedVersion(t *testing.T) { }, { kubernetesVersion: "1.10.1", - expectedVersion: version.MustParseSemantic("3.2.24"), + expectedVersion: version.MustParseSemantic("3.3.17-0"), expectedWarning: true, expectedError: false, }, diff --git a/cmd/kubeadm/app/phases/etcd/local.go b/cmd/kubeadm/app/phases/etcd/local.go index 10e60807af2..93d10e6f1c8 100644 --- a/cmd/kubeadm/app/phases/etcd/local.go +++ b/cmd/kubeadm/app/phases/etcd/local.go @@ -224,9 +224,12 @@ func GetEtcdPodSpec(cfg *kubeadmapi.ClusterConfiguration, endpoint *kubeadmapi.A v1.ResourceMemory: resource.MustParse("100Mi"), }, }, - LivenessProbe: staticpodutil.LivenessProbe(probeHostname, "/health?exclude=NOSPACE&serializable=true", probePort, probeScheme), - StartupProbe: staticpodutil.StartupProbe(probeHostname, "/health?serializable=false", probePort, probeScheme, componentHealthCheckTimeout), - Env: kubeadmutil.MergeKubeadmEnvVars(cfg.Etcd.Local.ExtraEnvs), + // The etcd probe endpoints are explained here: + // https://github.com/kubernetes/kubeadm/issues/3039 + LivenessProbe: staticpodutil.LivenessProbe(probeHostname, "/livez", probePort, probeScheme), + ReadinessProbe: staticpodutil.ReadinessProbe(probeHostname, "/readyz", probePort, probeScheme), + StartupProbe: staticpodutil.StartupProbe(probeHostname, "/readyz", probePort, probeScheme, componentHealthCheckTimeout), + Env: kubeadmutil.MergeKubeadmEnvVars(cfg.Etcd.Local.ExtraEnvs), }, etcdMounts, // etcd will listen on the advertise address of the API server, in a different port (2379) diff --git a/cmd/kubeadm/app/phases/etcd/local_test.go b/cmd/kubeadm/app/phases/etcd/local_test.go index e04c8655eb5..50cd5a96c6c 100644 --- a/cmd/kubeadm/app/phases/etcd/local_test.go +++ b/cmd/kubeadm/app/phases/etcd/local_test.go @@ -129,13 +129,22 @@ spec: failureThreshold: 8 httpGet: host: 127.0.0.1 - path: /health?exclude=NOSPACE&serializable=true + path: /livez port: 2381 scheme: HTTP initialDelaySeconds: 10 periodSeconds: 10 timeoutSeconds: 15 name: etcd + readinessProbe: + failureThreshold: 3 + httpGet: + host: 127.0.0.1 + path: /readyz + port: 2381 + scheme: HTTP + periodSeconds: 1 + timeoutSeconds: 15 resources: requests: cpu: 100m @@ -144,7 +153,7 @@ spec: failureThreshold: 24 httpGet: host: 127.0.0.1 - path: /health?serializable=false + path: /readyz port: 2381 scheme: HTTP initialDelaySeconds: 10