Skip to content

Commit

Permalink
Merge pull request #3832 from tstromberg/k8s-v1.10.0
Browse files Browse the repository at this point in the history
Skip "pull" command if using Kubernetes 1.10, which does not support it.
  • Loading branch information
tstromberg authored Mar 20, 2019
2 parents da2b1b0 + 7eeb0a7 commit c1a0264
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/minikube/bootstrapper/kubeadm/kubeadm.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,14 @@ func (k *KubeadmBootstrapper) DeleteCluster(k8s config.KubernetesConfig) error {

// PullImages downloads images that will be used by RestartCluster
func (k *KubeadmBootstrapper) PullImages(k8s config.KubernetesConfig) error {
version, err := ParseKubernetesVersion(k8s.KubernetesVersion)
if err != nil {
return errors.Wrap(err, "parsing kubernetes version")
}
if version.LT(semver.MustParse("1.11.0")) {
return fmt.Errorf("pull command is not supported by kubeadm v%s", version)
}

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

0 comments on commit c1a0264

Please sign in to comment.