Skip to content

Commit

Permalink
Use --kubeconfig for v1.10.x, instead of skipping the pull
Browse files Browse the repository at this point in the history
  • Loading branch information
tstromberg committed Mar 20, 2019
1 parent f968cb7 commit 0c1b51c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/minikube/bootstrapper/kubeadm/kubeadm.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,11 +318,13 @@ func (k *KubeadmBootstrapper) PullImages(k8s config.KubernetesConfig) error {
if err != nil {
return errors.Wrap(err, "parsing kubernetes version")
}

cFlag := "config"
if version.LT(semver.MustParse("1.11.0")) {
return fmt.Errorf("pull command is not supported by kubeadm v%s", version)
cFlag := "kubeconfig"
}

cmd := fmt.Sprintf("sudo kubeadm config images pull --config %s", constants.KubeadmConfigFile)
cmd := fmt.Sprintf("sudo kubeadm config images pull --%s %s", cFlag, constants.KubeadmConfigFile)
if err := k.c.Run(cmd); err != nil {
return errors.Wrapf(err, "running cmd: %s", cmd)
}
Expand Down

0 comments on commit 0c1b51c

Please sign in to comment.