You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: cmd/minikube/cmd/start.go
+18-9
Original file line number
Diff line number
Diff line change
@@ -153,7 +153,7 @@ func initMinikubeFlags() {
153
153
startCmd.Flags().String(memory, defaultMemorySize, "Amount of RAM allocated to the minikube VM (format: <number>[<unit>], where unit = b, k, m or g).")
154
154
startCmd.Flags().String(humanReadableDiskSize, defaultDiskSize, "Disk size allocated to the minikube VM (format: <number>[<unit>], where unit = b, k, m or g).")
155
155
startCmd.Flags().Bool(downloadOnly, false, "If true, only download and cache files for later use - don't install or start anything.")
156
-
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.")
156
+
startCmd.Flags().Bool(cacheImages, true, "If true, cache docker images for the current bootstrapper and load them into the machine. Always false with --driver=none.")
157
157
startCmd.Flags().String(isoURL, constants.DefaultISOURL, "Location of the minikube iso.")
158
158
startCmd.Flags().Bool(keepContext, false, "This will keep the existing kubectl context and will create a minikube context.")
159
159
startCmd.Flags().Bool(embedCerts, false, "if true, will embed the certs in kubeconfig.")
@@ -189,7 +189,8 @@ func initKubernetesFlags() {
189
189
190
190
// initDriverFlags inits the commandline flags for vm drivers
191
191
funcinitDriverFlags() {
192
-
startCmd.Flags().String("vm-driver", "", fmt.Sprintf("Driver is one of: %v (defaults to auto-detect)", driver.DisplaySupportedDrivers()))
192
+
startCmd.Flags().String("driver", "", fmt.Sprintf("Driver is one of: %v (defaults to auto-detect)", driver.DisplaySupportedDrivers()))
193
+
startCmd.Flags().String("vm-driver", "", "DEPRECATED, use `driver` instead.")
193
194
startCmd.Flags().Bool(disableDriverMounts, false, "Disables the filesystem mounts provided by the hypervisors")
out.T(out.Sparkle, `Using the {{.driver}} driver based on user configuration`, out.V{"driver": ds.String()})
451
+
returnds
452
+
}
453
+
454
+
// Fallback to old driver parameter
455
+
ifviper.GetString("driver") !="" {
456
+
ds:=driver.Status(viper.GetString("driver"))
448
457
out.T(out.Sparkle, `Using the {{.driver}} driver based on user configuration`, out.V{"driver": ds.String()})
449
458
returnds
450
459
}
451
460
452
461
pick, alts:=driver.Suggest(driver.Choices())
453
462
ifpick.Name=="" {
454
-
exit.WithCodeT(exit.Config, "Unable to determine a default driver to use. Try specifying --vm-driver, or see https://minikube.sigs.k8s.io/docs/start/")
463
+
exit.WithCodeT(exit.Config, "Unable to determine a default driver to use. Try specifying --driver, or see https://minikube.sigs.k8s.io/docs/start/")
0 commit comments