diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index 1504019311..cd7b59f3f6 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -300,6 +300,7 @@ func provisionWithDriver(cmd *cobra.Command, ds registry.DriverState, existing * } virtualBoxMacOS13PlusWarning(driverName) + vmwareUnsupported(driverName) validateFlags(cmd, driverName) validateUser(driverName) if driverName == oci.Docker { @@ -374,23 +375,33 @@ func provisionWithDriver(cmd *cobra.Command, ds registry.DriverState, existing * } func virtualBoxMacOS13PlusWarning(driverName string) { - if driverName != "virtualbox" || !detect.MacOS13Plus() { + if !driver.IsVirtualBox(driverName) || !detect.MacOS13Plus() { return } - driver := "hyperkit" + suggestedDriver := driver.HyperKit if runtime.GOARCH == "arm64" { - driver = "qemu" + suggestedDriver = driver.QEMU } out.WarningT(`Due to changes in macOS 13+ minikube doesn't currently support VirtualBox. You can use alternative drivers such as docker or {{.driver}}. https://minikube.sigs.k8s.io/docs/drivers/docker/ https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}/ For more details on the issue see: https://github.com/kubernetes/minikube/issues/15274 -`, out.V{"driver": driver}) +`, out.V{"driver": suggestedDriver}) +} + +func vmwareUnsupported(driverName string) { + if !driver.IsVMware(driverName) { + return + } + exit.Message(reason.DrvUnsupported, `Due to security improvements to minikube the VMware driver is currently not supported. Available workarounds are to use a different driver or downgrade minikube to v1.29.0. + + We are accepting community contributions to fix this, for more details on the issue see: https://github.com/kubernetes/minikube/issues/16221 +`) } func validateBuiltImageVersion(r command.Runner, driverName string) { - if driverName == driver.None { + if driver.IsNone(driverName) { return } res, err := r.RunCmd(exec.Command("cat", "/version.json")) @@ -1459,7 +1470,7 @@ func noLimitMemory(sysLimit, containerLimit int, drvName string) int { } // Recommend 1GB to handle OS/VM overhead sysOverhead := 1024 - if drvName == "virtualbox" { + if driver.IsVirtualBox(drvName) { // VirtualBox fully allocates all requested memory on start, it doesn't dynamically allocate when needed like other drivers // Because of this allow more system overhead to prevent out of memory issues sysOverhead = 1536 diff --git a/pkg/minikube/driver/driver.go b/pkg/minikube/driver/driver.go index 3b8c67a849..40901c6e14 100644 --- a/pkg/minikube/driver/driver.go +++ b/pkg/minikube/driver/driver.go @@ -190,6 +190,16 @@ func IsSSH(name string) bool { return name == SSH } +// IsVirtualBox checks if the driver is VirtualBox +func IsVirtualBox(name string) bool { + return name == VirtualBox +} + +// IsVMware checks if the driver is VMware +func IsVMware(name string) bool { + return name == VMware +} + // AllowsPreload returns if preload is allowed for the driver func AllowsPreload(driverName string) bool { return !BareMetal(driverName) && !IsSSH(driverName) diff --git a/pkg/minikube/node/start.go b/pkg/minikube/node/start.go index b1ddf65bbb..877265cbe9 100644 --- a/pkg/minikube/node/start.go +++ b/pkg/minikube/node/start.go @@ -922,7 +922,7 @@ func addCoreDNSEntry(runner command.Runner, name, ip string, cc config.ClusterCo func warnVirtualBox() { var altDriverList strings.Builder for _, choice := range driver.Choices(true) { - if choice.Name != "virtualbox" && choice.Priority != registry.Discouraged && choice.State.Installed && choice.State.Healthy { + if !driver.IsVirtualBox(choice.Name) && choice.Priority != registry.Discouraged && choice.State.Installed && choice.State.Healthy { altDriverList.WriteString(fmt.Sprintf("\n\t- %s", choice.Name)) } } diff --git a/pkg/minikube/reason/reason.go b/pkg/minikube/reason/reason.go index b8bfe64139..8d6ed7dbd1 100644 --- a/pkg/minikube/reason/reason.go +++ b/pkg/minikube/reason/reason.go @@ -286,6 +286,8 @@ var ( } // minikube failed to bind container ports to host ports DrvPortForward = Kind{ID: "DRV_PORT_FORWARD", ExitCode: ExDriverError} + // the driver is currently not supported by minikube + DrvUnsupported = Kind{ID: "DRV_UNSUPPORTED", ExitCode: ExDriverUnsupported} // the driver in use does not support multi-node clusters DrvUnsupportedMulti = Kind{ID: "DRV_UNSUPPORTED_MULTINODE", ExitCode: ExDriverConflict} // the specified driver is not supported on the host OS diff --git a/pkg/minikube/registry/drvs/vmware/vmware.go b/pkg/minikube/registry/drvs/vmware/vmware.go index de335931f7..ac852467aa 100644 --- a/pkg/minikube/registry/drvs/vmware/vmware.go +++ b/pkg/minikube/registry/drvs/vmware/vmware.go @@ -32,8 +32,8 @@ func init() { err := registry.Register(registry.DriverDef{ Name: driver.VMware, Config: configure, - Default: true, - Priority: registry.Default, + Default: false, + Priority: registry.Deprecated, Status: status, }) if err != nil { diff --git a/site/content/en/docs/contrib/errorcodes.en.md b/site/content/en/docs/contrib/errorcodes.en.md index c5e64788a9..6f766dedef 100644 --- a/site/content/en/docs/contrib/errorcodes.en.md +++ b/site/content/en/docs/contrib/errorcodes.en.md @@ -223,6 +223,9 @@ minikube failed to access the driver control plane or API endpoint "DRV_PORT_FORWARD" (Exit code ExDriverError) minikube failed to bind container ports to host ports +"DRV_UNSUPPORTED" (Exit code ExDriverUnsupported) +the driver is currently not supported by minikube + "DRV_UNSUPPORTED_MULTINODE" (Exit code ExDriverConflict) the driver in use does not support multi-node clusters diff --git a/translations/de.json b/translations/de.json index c14656d501..f63b4bfb55 100644 --- a/translations/de.json +++ b/translations/de.json @@ -181,6 +181,7 @@ "Downloading driver {{.driver}}:": "Lade Treiber {{.driver}} herunter:", "Due to DNS issues your cluster may have problems starting and you may not be able to pull images\nMore details available at: https://minikube.sigs.k8s.io/docs/drivers/qemu/#known-issues": "", "Due to changes in macOS 13+ minikube doesn't currently support VirtualBox. You can use alternative drivers such as docker or {{.driver}}.\n https://minikube.sigs.k8s.io/docs/drivers/docker/\n https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}/\n\n For more details on the issue see: https://github.com/kubernetes/minikube/issues/15274\n": "", + "Due to security improvements to minikube the VMware driver is currently not supported. Available workarounds are to use a different driver or downgrade minikube to v1.29.0.\n\n We are accepting community contributions to fix this, for more details on the issue see: https://github.com/kubernetes/minikube/issues/16221\n": "", "Duration until minikube certificate expiration, defaults to three years (26280h).": "Dauer bis das Minikube-Zertifikat abläuft, Default ist drei Jahre (26280 Stunden).", "ERROR creating `registry-creds-acr` secret": "Fehler beim Erstellen des `registry-creds-acr` Secrets", "ERROR creating `registry-creds-dpr` secret": "Fehler beim Erstellen des `registry-creds-dpr` Secrets", diff --git a/translations/es.json b/translations/es.json index e92b8751ef..a0aecc7f1a 100644 --- a/translations/es.json +++ b/translations/es.json @@ -189,6 +189,7 @@ "Due to issues with CRI-O post v1.17.3, we need to restart your cluster.": "Debido a problemas con CRI-O post v1.17.3, necesitamos reiniciar tu cluster.", "Due to networking limitations of driver {{.driver_name}} on {{.os_name}}, {{.addon_name}} addon is not supported.\nAlternatively to use this addon you can use a vm-based driver:\n\n\t'minikube start --vm=true'\n\nTo track the update on this work in progress feature please check:\nhttps://github.com/kubernetes/minikube/issues/7332": "Debido a las limitaciones de red del controlador {{.driver_name}} en {{.os_name}}, el complemento \"{{.addon_name}}\" no está soportado.\nPara usar este complemento, puedes utilizar un controlador basado en vm\n\n\t'minikube start --vm=true'\n\nPara realizar un seguimiento de las actualizaciones de esta función consulte:\nhttps://github.com/kubernetes/minikube/issues/7332", "Due to networking limitations of driver {{.driver_name}}, {{.addon_name}} addon is not supported. Try using a different driver.": "Debido a limitaciones de red del controlador {{.driver_name}}, el complemento \"{{.addon_name}}\" no está soportado. Intenta usar un controlador diferente.", + "Due to security improvements to minikube the VMware driver is currently not supported. Available workarounds are to use a different driver or downgrade minikube to v1.29.0.\n\n We are accepting community contributions to fix this, for more details on the issue see: https://github.com/kubernetes/minikube/issues/16221\n": "", "Duration until minikube certificate expiration, defaults to three years (26280h).": "", "ERROR creating `registry-creds-acr` secret": "ERROR creando el secreto `registry-creds-acr`", "ERROR creating `registry-creds-dpr` secret": "ERROR creando el secreto `registry-creds-dpr`", diff --git a/translations/fr.json b/translations/fr.json index 42c794b612..ff71406971 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -183,6 +183,7 @@ "Downloading driver {{.driver}}:": "Téléchargement du pilote {{.driver}} :", "Due to DNS issues your cluster may have problems starting and you may not be able to pull images\nMore details available at: https://minikube.sigs.k8s.io/docs/drivers/qemu/#known-issues": "En raison de problèmes DNS, votre cluster peut avoir des problèmes de démarrage et vous ne pourrez peut-être pas extraire d'images\nPlus de détails disponibles sur : https://minikube.sigs.k8s.io/docs/drivers/qemu/#known-issues", "Due to changes in macOS 13+ minikube doesn't currently support VirtualBox. You can use alternative drivers such as docker or {{.driver}}.\n https://minikube.sigs.k8s.io/docs/drivers/docker/\n https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}/\n\n For more details on the issue see: https://github.com/kubernetes/minikube/issues/15274\n": "En raison de changements dans macOS 13+, minikube ne prend actuellement pas en charge VirtualBox. Vous pouvez utiliser des pilotes alternatifs tels que docker ou {{.driver}}.\n https://minikube.sigs.k8s.io/docs/drivers/docker/\n https://minikube.sigs.k8s.io/ docs/drivers/{{.driver}}/\n\n Pour plus de détails sur le problème, voir : https://github.com/kubernetes/minikube/issues/15274\n", + "Due to security improvements to minikube the VMware driver is currently not supported. Available workarounds are to use a different driver or downgrade minikube to v1.29.0.\n\n We are accepting community contributions to fix this, for more details on the issue see: https://github.com/kubernetes/minikube/issues/16221\n": "", "Duration until minikube certificate expiration, defaults to three years (26280h).": "Durée jusqu'à l'expiration du certificat minikube, par défaut à trois ans (26280h).", "ERROR creating `registry-creds-acr` secret": "ERREUR lors de la création du secret `registry-creds-acr`", "ERROR creating `registry-creds-dpr` secret": "ERREUR lors de la création du secret `registry-creds-dpr`", diff --git a/translations/ja.json b/translations/ja.json index 7bce1e15c0..63da5bef60 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -173,6 +173,7 @@ "Downloading driver {{.driver}}:": "{{.driver}} ドライバーをダウンロードしています:", "Due to DNS issues your cluster may have problems starting and you may not be able to pull images\nMore details available at: https://minikube.sigs.k8s.io/docs/drivers/qemu/#known-issues": "DNS の問題により、クラスターの起動に問題が発生し、イメージを取得できない場合があります\n詳細については、https://minikube.sigs.k8s.io/docs/drivers/qemu/#known-issues を参照してください", "Due to changes in macOS 13+ minikube doesn't currently support VirtualBox. You can use alternative drivers such as docker or {{.driver}}.\n https://minikube.sigs.k8s.io/docs/drivers/docker/\n https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}/\n\n For more details on the issue see: https://github.com/kubernetes/minikube/issues/15274\n": "", + "Due to security improvements to minikube the VMware driver is currently not supported. Available workarounds are to use a different driver or downgrade minikube to v1.29.0.\n\n We are accepting community contributions to fix this, for more details on the issue see: https://github.com/kubernetes/minikube/issues/16221\n": "", "Duration until minikube certificate expiration, defaults to three years (26280h).": "minikube 証明書の有効期限。デフォルトは 3 年間 (26280h)。", "ERROR creating `registry-creds-acr` secret": "`registry-creds-acr` シークレット作成中にエラーが発生しました", "ERROR creating `registry-creds-dpr` secret": "`registry-creds-dpr` シークレット作成中にエラーが発生しました", diff --git a/translations/ko.json b/translations/ko.json index e39b9ac87f..dcc8626d35 100644 --- a/translations/ko.json +++ b/translations/ko.json @@ -191,6 +191,7 @@ "Downloading {{.name}} {{.version}}": "{{.name}} {{.version}} 다운로드 중", "Due to DNS issues your cluster may have problems starting and you may not be able to pull images\nMore details available at: https://minikube.sigs.k8s.io/docs/drivers/qemu/#known-issues": "", "Due to changes in macOS 13+ minikube doesn't currently support VirtualBox. You can use alternative drivers such as docker or {{.driver}}.\n https://minikube.sigs.k8s.io/docs/drivers/docker/\n https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}/\n\n For more details on the issue see: https://github.com/kubernetes/minikube/issues/15274\n": "", + "Due to security improvements to minikube the VMware driver is currently not supported. Available workarounds are to use a different driver or downgrade minikube to v1.29.0.\n\n We are accepting community contributions to fix this, for more details on the issue see: https://github.com/kubernetes/minikube/issues/16221\n": "", "Duration until minikube certificate expiration, defaults to three years (26280h).": "", "ERROR creating `registry-creds-acr` secret": "registry-creds-acr` secret 생성 오류", "ERROR creating `registry-creds-dpr` secret": "`registry-creds-dpr` secret 생성 오류", diff --git a/translations/pl.json b/translations/pl.json index 3817ee6f1b..0dc1d477bf 100644 --- a/translations/pl.json +++ b/translations/pl.json @@ -191,6 +191,7 @@ "Downloading {{.name}} {{.version}}": "Pobieranie {{.name}} {{.version}}", "Due to DNS issues your cluster may have problems starting and you may not be able to pull images\nMore details available at: https://minikube.sigs.k8s.io/docs/drivers/qemu/#known-issues": "", "Due to changes in macOS 13+ minikube doesn't currently support VirtualBox. You can use alternative drivers such as docker or {{.driver}}.\n https://minikube.sigs.k8s.io/docs/drivers/docker/\n https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}/\n\n For more details on the issue see: https://github.com/kubernetes/minikube/issues/15274\n": "", + "Due to security improvements to minikube the VMware driver is currently not supported. Available workarounds are to use a different driver or downgrade minikube to v1.29.0.\n\n We are accepting community contributions to fix this, for more details on the issue see: https://github.com/kubernetes/minikube/issues/16221\n": "", "Duration until minikube certificate expiration, defaults to three years (26280h).": "", "ERROR creating `registry-creds-acr` secret": "", "ERROR creating `registry-creds-dpr` secret": "", diff --git a/translations/ru.json b/translations/ru.json index 388be6e2d5..d2b862a108 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -170,6 +170,7 @@ "Downloading driver {{.driver}}:": "", "Due to DNS issues your cluster may have problems starting and you may not be able to pull images\nMore details available at: https://minikube.sigs.k8s.io/docs/drivers/qemu/#known-issues": "", "Due to changes in macOS 13+ minikube doesn't currently support VirtualBox. You can use alternative drivers such as docker or {{.driver}}.\n https://minikube.sigs.k8s.io/docs/drivers/docker/\n https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}/\n\n For more details on the issue see: https://github.com/kubernetes/minikube/issues/15274\n": "", + "Due to security improvements to minikube the VMware driver is currently not supported. Available workarounds are to use a different driver or downgrade minikube to v1.29.0.\n\n We are accepting community contributions to fix this, for more details on the issue see: https://github.com/kubernetes/minikube/issues/16221\n": "", "Duration until minikube certificate expiration, defaults to three years (26280h).": "", "ERROR creating `registry-creds-acr` secret": "", "ERROR creating `registry-creds-dpr` secret": "", diff --git a/translations/strings.txt b/translations/strings.txt index b1f3ce71ff..ea6eb0f374 100644 --- a/translations/strings.txt +++ b/translations/strings.txt @@ -170,6 +170,7 @@ "Downloading driver {{.driver}}:": "", "Due to DNS issues your cluster may have problems starting and you may not be able to pull images\nMore details available at: https://minikube.sigs.k8s.io/docs/drivers/qemu/#known-issues": "", "Due to changes in macOS 13+ minikube doesn't currently support VirtualBox. You can use alternative drivers such as docker or {{.driver}}.\n https://minikube.sigs.k8s.io/docs/drivers/docker/\n https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}/\n\n For more details on the issue see: https://github.com/kubernetes/minikube/issues/15274\n": "", + "Due to security improvements to minikube the VMware driver is currently not supported. Available workarounds are to use a different driver or downgrade minikube to v1.29.0.\n\n We are accepting community contributions to fix this, for more details on the issue see: https://github.com/kubernetes/minikube/issues/16221\n": "", "Duration until minikube certificate expiration, defaults to three years (26280h).": "", "ERROR creating `registry-creds-acr` secret": "", "ERROR creating `registry-creds-dpr` secret": "", diff --git a/translations/zh-CN.json b/translations/zh-CN.json index 7e23b2c928..a9e3419f5b 100644 --- a/translations/zh-CN.json +++ b/translations/zh-CN.json @@ -217,6 +217,7 @@ "Downloading {{.name}} {{.version}}": "正在下载 {{.name}} {{.version}}", "Due to DNS issues your cluster may have problems starting and you may not be able to pull images\nMore details available at: https://minikube.sigs.k8s.io/docs/drivers/qemu/#known-issues": "", "Due to changes in macOS 13+ minikube doesn't currently support VirtualBox. You can use alternative drivers such as docker or {{.driver}}.\n https://minikube.sigs.k8s.io/docs/drivers/docker/\n https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}/\n\n For more details on the issue see: https://github.com/kubernetes/minikube/issues/15274\n": "", + "Due to security improvements to minikube the VMware driver is currently not supported. Available workarounds are to use a different driver or downgrade minikube to v1.29.0.\n\n We are accepting community contributions to fix this, for more details on the issue see: https://github.com/kubernetes/minikube/issues/16221\n": "", "Duration until minikube certificate expiration, defaults to three years (26280h).": "", "ERROR creating `registry-creds-acr` secret": "", "ERROR creating `registry-creds-dpr` secret": "创建 `registry-creds-dpr` secret 时出错",