From 2f3fe5d2580500ea3d3c75678f7a71ad9ddcb9a4 Mon Sep 17 00:00:00 2001 From: Steven Powell Date: Wed, 12 Oct 2022 15:05:00 -0700 Subject: [PATCH 1/3] use port forwarding on Linux with Docker Desktop --- pkg/drivers/kic/oci/info.go | 3 ++- pkg/minikube/driver/driver.go | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/drivers/kic/oci/info.go b/pkg/drivers/kic/oci/info.go index b8c7cf33ca..5f9166d677 100644 --- a/pkg/drivers/kic/oci/info.go +++ b/pkg/drivers/kic/oci/info.go @@ -35,6 +35,7 @@ type SysInfo struct { Rootless bool // Weather or not the docker is running on rootless mode StorageDriver string // the storage driver for the daemon (for example overlay2) Errors []string // any server issues + DockerOS string // used to detect if using Docker Desktop or Docker Engine on Linux } var ( @@ -70,7 +71,7 @@ func DaemonInfo(ociBin string) (SysInfo, error) { break } } - cachedSysInfo = &SysInfo{CPUs: d.NCPU, TotalMemory: d.MemTotal, OSType: d.OSType, Swarm: d.Swarm.LocalNodeState == "active", Rootless: rootless, StorageDriver: d.Driver, Errors: d.ServerErrors} + cachedSysInfo = &SysInfo{CPUs: d.NCPU, TotalMemory: d.MemTotal, OSType: d.OSType, Swarm: d.Swarm.LocalNodeState == "active", Rootless: rootless, StorageDriver: d.Driver, Errors: d.ServerErrors, DockerOS: d.OperatingSystem} return *cachedSysInfo, err } diff --git a/pkg/minikube/driver/driver.go b/pkg/minikube/driver/driver.go index c58e985e5e..3b8c67a849 100644 --- a/pkg/minikube/driver/driver.go +++ b/pkg/minikube/driver/driver.go @@ -212,6 +212,9 @@ func NeedsPortForward(name string) bool { if err != nil { panic(err) } + if runtime.GOOS == "linux" && si.DockerOS == "Docker Desktop" { + return true + } return si.Rootless } From 33ad2326063efe1706ed38443c398124e91f225c Mon Sep 17 00:00:00 2001 From: Steven Powell Date: Wed, 12 Oct 2022 15:23:01 -0700 Subject: [PATCH 2/3] add warning to users using Docker Desktop on Linux --- cmd/minikube/cmd/start_flags.go | 3 +++ translations/de.json | 1 + translations/es.json | 1 + translations/fr.json | 1 + translations/ja.json | 1 + translations/ko.json | 1 + translations/pl.json | 1 + translations/ru.json | 1 + translations/strings.txt | 1 + translations/zh-CN.json | 1 + 10 files changed, 12 insertions(+) diff --git a/cmd/minikube/cmd/start_flags.go b/cmd/minikube/cmd/start_flags.go index 281ca96341..29cb04ead8 100644 --- a/cmd/minikube/cmd/start_flags.go +++ b/cmd/minikube/cmd/start_flags.go @@ -611,6 +611,9 @@ func generateNewConfigFromFlags(cmd *cobra.Command, k8sVersion string, rtime str klog.Info("auto-setting LocalStorageCapacityIsolation to false because using btrfs storage driver") cc.KubernetesConfig.FeatureGates = addFeatureGate(cc.KubernetesConfig.FeatureGates, "LocalStorageCapacityIsolation=false") } + if runtime.GOOS == "linux" && si.DockerOS == "Docker Desktop" { + out.WarningT("For an improved experience it's recommended to use Docker Engine over Docker Desktop") + } } return cc diff --git a/translations/de.json b/translations/de.json index 38e44530ba..e6b4e8ef0d 100644 --- a/translations/de.json +++ b/translations/de.json @@ -295,6 +295,7 @@ "Filter to use only VM Drivers": "Filtern um nur VM Treiber zu verwenden", "Flags": "", "Follow": "Fehler beim Folgen der Logs", + "For an improved experience it's recommended to use Docker Engine over Docker Desktop": "", "For best results, install kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/": "Für beste Ergebnisse installieren Sie kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/", "For best results, install kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/__1": "Für beste Ergebnisse installieren Sie kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/", "For improved {{.driver}} performance, {{.fix}}": "Um die {{.driver}} Performance zu verbessern, {{.fix}}", diff --git a/translations/es.json b/translations/es.json index da90c9cb58..d91c2e909f 100644 --- a/translations/es.json +++ b/translations/es.json @@ -304,6 +304,7 @@ "Filter to use only VM Drivers": "", "Flags": "", "Follow": "", + "For an improved experience it's recommended to use Docker Engine over Docker Desktop": "", "For best results, install kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/": "Para disfrutar de un funcionamiento óptimo, instala kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/", "For best results, install kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/__1": "Para disfrutar de un funcionamiento óptimo, instala kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/", "For improved {{.driver}} performance, {{.fix}}": "", diff --git a/translations/fr.json b/translations/fr.json index 86b513371a..bd9564585e 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -289,6 +289,7 @@ "Filter to use only VM Drivers": "Filtrer pour n'utiliser que les pilotes VM", "Flags": "Indicateurs", "Follow": "Suivre", + "For an improved experience it's recommended to use Docker Engine over Docker Desktop": "", "For improved {{.driver}} performance, {{.fix}}": "Pour de meilleures performances {{.driver}}, {{.fix}}", "For more information see: https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}": "Pour plus d'informations, voir : https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}", "For more information, see: https://minikube.sigs.k8s.io/docs/reference/drivers/none/": "Pour plus d'informations, voir : https://minikube.sigs.k8s.io/docs/reference/drivers/none/", diff --git a/translations/ja.json b/translations/ja.json index a85797ebb0..ffea00abb6 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -278,6 +278,7 @@ "Filter to use only VM Drivers": "VM ドライバーのみ使用するためのフィルタ", "Flags": "フラグ", "Follow": "フォロー", + "For an improved experience it's recommended to use Docker Engine over Docker Desktop": "", "For improved {{.driver}} performance, {{.fix}}": "{{.driver}} の性能向上のため、{{.fix}}", "For more information see: https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}": "追加の詳細情報はこちらを参照してください: https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}", "For more information, see: https://minikube.sigs.k8s.io/docs/reference/drivers/none/": "追加の詳細情報はこちらを参照してください: https://minikube.sigs.k8s.io/docs/reference/drivers/none/", diff --git a/translations/ko.json b/translations/ko.json index 042099d633..ac71289679 100644 --- a/translations/ko.json +++ b/translations/ko.json @@ -319,6 +319,7 @@ "Filter to use only VM Drivers": "", "Flags": "", "Follow": "", + "For an improved experience it's recommended to use Docker Engine over Docker Desktop": "", "For improved {{.driver}} performance, {{.fix}}": "", "For more information see: https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}": "", "For more information, see:": "더 많은 정보를 보려면, 다음을 참고하세요:", diff --git a/translations/pl.json b/translations/pl.json index c8a196b695..dfa8ea206d 100644 --- a/translations/pl.json +++ b/translations/pl.json @@ -306,6 +306,7 @@ "Filter to use only VM Drivers": "", "Flags": "", "Follow": "", + "For an improved experience it's recommended to use Docker Engine over Docker Desktop": "", "For improved {{.driver}} performance, {{.fix}}": "", "For more information see: https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}": "", "For more information, see: https://minikube.sigs.k8s.io/docs/reference/drivers/none/": "", diff --git a/translations/ru.json b/translations/ru.json index ddd6374b4c..7d4a8735fd 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -276,6 +276,7 @@ "Filter to use only VM Drivers": "", "Flags": "", "Follow": "", + "For an improved experience it's recommended to use Docker Engine over Docker Desktop": "", "For improved {{.driver}} performance, {{.fix}}": "", "For more information see: https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}": "", "For more information, see: https://minikube.sigs.k8s.io/docs/reference/drivers/none/": "", diff --git a/translations/strings.txt b/translations/strings.txt index c8d61a7101..695a547b93 100644 --- a/translations/strings.txt +++ b/translations/strings.txt @@ -276,6 +276,7 @@ "Filter to use only VM Drivers": "", "Flags": "", "Follow": "", + "For an improved experience it's recommended to use Docker Engine over Docker Desktop": "", "For improved {{.driver}} performance, {{.fix}}": "", "For more information see: https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}": "", "For more information, see: https://minikube.sigs.k8s.io/docs/reference/drivers/none/": "", diff --git a/translations/zh-CN.json b/translations/zh-CN.json index bfdbbae5e9..bb7e9f1d81 100644 --- a/translations/zh-CN.json +++ b/translations/zh-CN.json @@ -372,6 +372,7 @@ "Filter to use only VM Drivers": "", "Flags": "标志", "Follow": "跟踪", + "For an improved experience it's recommended to use Docker Engine over Docker Desktop": "", "For best results, install kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/": "为获得最佳结果,请安装 kubectl:https://kubernetes.io/docs/tasks/tools/install-kubectl/", "For best results, install kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/__1": "为获得最佳结果,请安装 kubectl:https://kubernetes.io/docs/tasks/tools/install-kubectl/", "For improved {{.driver}} performance, {{.fix}}": "", From 643fed94f14aa0d83ed8b33f615ae924448ef055 Mon Sep 17 00:00:00 2001 From: Steven Powell Date: Tue, 18 Oct 2022 10:00:23 -0700 Subject: [PATCH 3/3] added link to Docker Engine instructions --- cmd/minikube/cmd/start_flags.go | 2 +- translations/de.json | 2 +- translations/es.json | 2 +- translations/fr.json | 2 +- translations/ja.json | 2 +- translations/ko.json | 2 +- translations/pl.json | 2 +- translations/ru.json | 2 +- translations/strings.txt | 2 +- translations/zh-CN.json | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cmd/minikube/cmd/start_flags.go b/cmd/minikube/cmd/start_flags.go index 29cb04ead8..39c07ea3ea 100644 --- a/cmd/minikube/cmd/start_flags.go +++ b/cmd/minikube/cmd/start_flags.go @@ -612,7 +612,7 @@ func generateNewConfigFromFlags(cmd *cobra.Command, k8sVersion string, rtime str cc.KubernetesConfig.FeatureGates = addFeatureGate(cc.KubernetesConfig.FeatureGates, "LocalStorageCapacityIsolation=false") } if runtime.GOOS == "linux" && si.DockerOS == "Docker Desktop" { - out.WarningT("For an improved experience it's recommended to use Docker Engine over Docker Desktop") + out.WarningT("For an improved experience it's recommended to use Docker Engine instead of Docker Desktop.\nDocker Engine installation instructions: https://docs.docker.com/engine/install/#server") } } diff --git a/translations/de.json b/translations/de.json index e6b4e8ef0d..50fcd5698d 100644 --- a/translations/de.json +++ b/translations/de.json @@ -295,7 +295,7 @@ "Filter to use only VM Drivers": "Filtern um nur VM Treiber zu verwenden", "Flags": "", "Follow": "Fehler beim Folgen der Logs", - "For an improved experience it's recommended to use Docker Engine over Docker Desktop": "", + "For an improved experience it's recommended to use Docker Engine instead of Docker Desktop.\nDocker Engine installation instructions: https://docs.docker.com/engine/install/#server": "", "For best results, install kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/": "Für beste Ergebnisse installieren Sie kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/", "For best results, install kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/__1": "Für beste Ergebnisse installieren Sie kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/", "For improved {{.driver}} performance, {{.fix}}": "Um die {{.driver}} Performance zu verbessern, {{.fix}}", diff --git a/translations/es.json b/translations/es.json index d91c2e909f..48dddcbf3f 100644 --- a/translations/es.json +++ b/translations/es.json @@ -304,7 +304,7 @@ "Filter to use only VM Drivers": "", "Flags": "", "Follow": "", - "For an improved experience it's recommended to use Docker Engine over Docker Desktop": "", + "For an improved experience it's recommended to use Docker Engine instead of Docker Desktop.\nDocker Engine installation instructions: https://docs.docker.com/engine/install/#server": "", "For best results, install kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/": "Para disfrutar de un funcionamiento óptimo, instala kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/", "For best results, install kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/__1": "Para disfrutar de un funcionamiento óptimo, instala kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/", "For improved {{.driver}} performance, {{.fix}}": "", diff --git a/translations/fr.json b/translations/fr.json index bd9564585e..c23c2e51cd 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -289,7 +289,7 @@ "Filter to use only VM Drivers": "Filtrer pour n'utiliser que les pilotes VM", "Flags": "Indicateurs", "Follow": "Suivre", - "For an improved experience it's recommended to use Docker Engine over Docker Desktop": "", + "For an improved experience it's recommended to use Docker Engine instead of Docker Desktop.\nDocker Engine installation instructions: https://docs.docker.com/engine/install/#server": "", "For improved {{.driver}} performance, {{.fix}}": "Pour de meilleures performances {{.driver}}, {{.fix}}", "For more information see: https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}": "Pour plus d'informations, voir : https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}", "For more information, see: https://minikube.sigs.k8s.io/docs/reference/drivers/none/": "Pour plus d'informations, voir : https://minikube.sigs.k8s.io/docs/reference/drivers/none/", diff --git a/translations/ja.json b/translations/ja.json index ffea00abb6..0533e275a8 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -278,7 +278,7 @@ "Filter to use only VM Drivers": "VM ドライバーのみ使用するためのフィルタ", "Flags": "フラグ", "Follow": "フォロー", - "For an improved experience it's recommended to use Docker Engine over Docker Desktop": "", + "For an improved experience it's recommended to use Docker Engine instead of Docker Desktop.\nDocker Engine installation instructions: https://docs.docker.com/engine/install/#server": "", "For improved {{.driver}} performance, {{.fix}}": "{{.driver}} の性能向上のため、{{.fix}}", "For more information see: https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}": "追加の詳細情報はこちらを参照してください: https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}", "For more information, see: https://minikube.sigs.k8s.io/docs/reference/drivers/none/": "追加の詳細情報はこちらを参照してください: https://minikube.sigs.k8s.io/docs/reference/drivers/none/", diff --git a/translations/ko.json b/translations/ko.json index ac71289679..2bb9b5250c 100644 --- a/translations/ko.json +++ b/translations/ko.json @@ -319,7 +319,7 @@ "Filter to use only VM Drivers": "", "Flags": "", "Follow": "", - "For an improved experience it's recommended to use Docker Engine over Docker Desktop": "", + "For an improved experience it's recommended to use Docker Engine instead of Docker Desktop.\nDocker Engine installation instructions: https://docs.docker.com/engine/install/#server": "", "For improved {{.driver}} performance, {{.fix}}": "", "For more information see: https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}": "", "For more information, see:": "더 많은 정보를 보려면, 다음을 참고하세요:", diff --git a/translations/pl.json b/translations/pl.json index dfa8ea206d..bd76f9ffcc 100644 --- a/translations/pl.json +++ b/translations/pl.json @@ -306,7 +306,7 @@ "Filter to use only VM Drivers": "", "Flags": "", "Follow": "", - "For an improved experience it's recommended to use Docker Engine over Docker Desktop": "", + "For an improved experience it's recommended to use Docker Engine instead of Docker Desktop.\nDocker Engine installation instructions: https://docs.docker.com/engine/install/#server": "", "For improved {{.driver}} performance, {{.fix}}": "", "For more information see: https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}": "", "For more information, see: https://minikube.sigs.k8s.io/docs/reference/drivers/none/": "", diff --git a/translations/ru.json b/translations/ru.json index 7d4a8735fd..0ca161c2cc 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -276,7 +276,7 @@ "Filter to use only VM Drivers": "", "Flags": "", "Follow": "", - "For an improved experience it's recommended to use Docker Engine over Docker Desktop": "", + "For an improved experience it's recommended to use Docker Engine instead of Docker Desktop.\nDocker Engine installation instructions: https://docs.docker.com/engine/install/#server": "", "For improved {{.driver}} performance, {{.fix}}": "", "For more information see: https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}": "", "For more information, see: https://minikube.sigs.k8s.io/docs/reference/drivers/none/": "", diff --git a/translations/strings.txt b/translations/strings.txt index 695a547b93..a92d63ed8b 100644 --- a/translations/strings.txt +++ b/translations/strings.txt @@ -276,7 +276,7 @@ "Filter to use only VM Drivers": "", "Flags": "", "Follow": "", - "For an improved experience it's recommended to use Docker Engine over Docker Desktop": "", + "For an improved experience it's recommended to use Docker Engine instead of Docker Desktop.\nDocker Engine installation instructions: https://docs.docker.com/engine/install/#server": "", "For improved {{.driver}} performance, {{.fix}}": "", "For more information see: https://minikube.sigs.k8s.io/docs/drivers/{{.driver}}": "", "For more information, see: https://minikube.sigs.k8s.io/docs/reference/drivers/none/": "", diff --git a/translations/zh-CN.json b/translations/zh-CN.json index bb7e9f1d81..99a3e928b9 100644 --- a/translations/zh-CN.json +++ b/translations/zh-CN.json @@ -372,7 +372,7 @@ "Filter to use only VM Drivers": "", "Flags": "标志", "Follow": "跟踪", - "For an improved experience it's recommended to use Docker Engine over Docker Desktop": "", + "For an improved experience it's recommended to use Docker Engine instead of Docker Desktop.\nDocker Engine installation instructions: https://docs.docker.com/engine/install/#server": "", "For best results, install kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/": "为获得最佳结果,请安装 kubectl:https://kubernetes.io/docs/tasks/tools/install-kubectl/", "For best results, install kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/__1": "为获得最佳结果,请安装 kubectl:https://kubernetes.io/docs/tasks/tools/install-kubectl/", "For improved {{.driver}} performance, {{.fix}}": "",