Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use port forwarding on Linux with Docker Desktop #15126

Merged
merged 3 commits into from
Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cmd/minikube/cmd/start_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 instead of Docker Desktop.\nDocker Engine installation instructions: https://docs.docker.com/engine/install/#server")
}
}

return cc
Expand Down
3 changes: 2 additions & 1 deletion pkg/drivers/kic/oci/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is OS short for here?

Copy link
Member Author

@spowelljr spowelljr Oct 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Operating System, Docker detects the OS, if it's Docker Engine it lists the machines actual OS (Debian, Ubuntu, etc.) but if it's Docker Desktop it lists the OS as Docker Desktop.

}

var (
Expand Down Expand Up @@ -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
}

Expand Down
3 changes: 3 additions & 0 deletions pkg/minikube/driver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
1 change: 1 addition & 0 deletions translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 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}}",
Expand Down
1 change: 1 addition & 0 deletions translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@
"Filter to use only VM Drivers": "",
"Flags": "",
"Follow": "",
"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}}": "",
Expand Down
1 change: 1 addition & 0 deletions translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 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/",
Expand Down
1 change: 1 addition & 0 deletions translations/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@
"Filter to use only VM Drivers": "VM ドライバーのみ使用するためのフィルタ",
"Flags": "フラグ",
"Follow": "フォロー",
"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/",
Expand Down
1 change: 1 addition & 0 deletions translations/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@
"Filter to use only VM Drivers": "",
"Flags": "",
"Follow": "",
"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:": "더 많은 정보를 보려면, 다음을 참고하세요:",
Expand Down
1 change: 1 addition & 0 deletions translations/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@
"Filter to use only VM Drivers": "",
"Flags": "",
"Follow": "",
"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/": "",
Expand Down
1 change: 1 addition & 0 deletions translations/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@
"Filter to use only VM Drivers": "",
"Flags": "",
"Follow": "",
"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/": "",
Expand Down
1 change: 1 addition & 0 deletions translations/strings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@
"Filter to use only VM Drivers": "",
"Flags": "",
"Follow": "",
"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/": "",
Expand Down
1 change: 1 addition & 0 deletions translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@
"Filter to use only VM Drivers": "",
"Flags": "标志",
"Follow": "跟踪",
"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}}": "",
Expand Down