From 30fd9092e6f1c5bb3a1bcc0e9c9475033798dc14 Mon Sep 17 00:00:00 2001 From: liubog2008 Date: Thu, 28 Mar 2019 10:44:51 +0800 Subject: [PATCH] fix(kubeadm): fix missing addon phase of kubeadm after v1.13.0 --- pkg/minikube/bootstrapper/kubeadm/kubeadm.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/minikube/bootstrapper/kubeadm/kubeadm.go b/pkg/minikube/bootstrapper/kubeadm/kubeadm.go index 6be7e6b2ab6b..82b3789978bb 100644 --- a/pkg/minikube/bootstrapper/kubeadm/kubeadm.go +++ b/pkg/minikube/bootstrapper/kubeadm/kubeadm.go @@ -318,6 +318,10 @@ func (k *Bootstrapper) RestartCluster(k8s config.KubernetesConfig) error { fmt.Sprintf("sudo kubeadm %s phase etcd local --config %s", phase, constants.KubeadmConfigFile), } + if version.GTE(semver.MustParse("1.13.0")) { + cmds = append(cmds, fmt.Sprintf("sudo kubeadm init phase addons all --config %s", constants.KubeadmConfigFile)) + } + // Run commands one at a time so that it is easier to root cause failures. for _, cmd := range cmds { if err := k.c.Run(cmd); err != nil {