diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index 18a75032bb3d..142cb24383ce 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -135,7 +135,7 @@ func init() { startCmd.Flags().String(networkPlugin, "", "The name of the network plugin") startCmd.Flags().Bool(enableDefaultCNI, false, "Enable the default CNI plugin (/etc/cni/net.d/k8s.conf). Used in conjunction with \"--network-plugin=cni\"") startCmd.Flags().String(featureGates, "", "A set of key=value pairs that describe feature gates for alpha/experimental features.") - startCmd.Flags().Bool(cacheImages, true, "If true, cache docker images for the current bootstrapper and load them into the machine.") + startCmd.Flags().Bool(cacheImages, true, "If true, cache docker images for the current bootstrapper and load them into the machine. Always false with --vm-driver=none.") startCmd.Flags().Var(&extraOptions, "extra-config", `A set of key=value pairs that describe configuration that may be passed to different components. The key should be '.' separated, and the first part before the dot is the component to apply the configuration to. @@ -174,6 +174,11 @@ func runStart(cmd *cobra.Command, args []string) { exit.WithError("Failed to generate config", err) } + if viper.GetString(vmDriver) == constants.DriverNone { + // Optimization: images will be persistently loaded into the host's container runtime, so no need to duplicate work. + viper.Set(cacheImages, false) + } + var cacheGroup errgroup.Group beginCacheImages(&cacheGroup, k8sVersion)