diff --git a/cmd/minikube/cmd/start_flags.go b/cmd/minikube/cmd/start_flags.go index 5b768a526702..c735e8025d67 100644 --- a/cmd/minikube/cmd/start_flags.go +++ b/cmd/minikube/cmd/start_flags.go @@ -255,7 +255,7 @@ func generateClusterConfig(cmd *cobra.Command, existing *config.ClusterConfig, k if strings.ToLower(repository) == "auto" || mirrorCountry != "" { found, autoSelectedRepository, err := selectImageRepository(mirrorCountry, semver.MustParse(strings.TrimPrefix(k8sVersion, version.VersionPrefix))) if err != nil { - exit.WithError("Failed to check main repository and mirrors for images for images", err) + exit.WithError("Failed to check main repository and mirrors for images", err) } if !found { @@ -269,7 +269,7 @@ func generateClusterConfig(cmd *cobra.Command, existing *config.ClusterConfig, k repository = autoSelectedRepository } - if cmd.Flags().Changed(imageRepository) { + if cmd.Flags().Changed(imageRepository) || cmd.Flags().Changed(imageMirrorCountry) { out.T(out.SuccessType, "Using image repository {{.name}}", out.V{"name": repository}) } diff --git a/pkg/minikube/node/cache.go b/pkg/minikube/node/cache.go index 5af6b2e30353..a5c3ed07a907 100644 --- a/pkg/minikube/node/cache.go +++ b/pkg/minikube/node/cache.go @@ -43,7 +43,8 @@ const ( // BeginCacheKubernetesImages caches images required for kubernetes version in the background func beginCacheKubernetesImages(g *errgroup.Group, imageRepository string, k8sVersion string, cRuntime string) { - if download.PreloadExists(k8sVersion, cRuntime) { + // TODO: remove imageRepository check once #7695 is fixed + if imageRepository == "" && download.PreloadExists(k8sVersion, cRuntime) { glog.Info("Caching tarball of preloaded images") err := download.Preload(k8sVersion, cRuntime) if err == nil {