update messaging if using user network

pull/14989/head
Steven Powell 2022-09-27 10:17:41 -07:00
parent 6d4f255ea6
commit 5c27bc4d11
1 changed files with 6 additions and 3 deletions

View File

@ -459,12 +459,15 @@ func getCNIConfig(cmd *cobra.Command) string {
func getNetwork(driverName string) string {
n := viper.GetString(network)
if n != "" {
if !driver.IsQEMU(driverName) {
return n
}
if driver.IsQEMU(driverName) {
if n == "" {
out.WarningT("The default network for QEMU will change from 'user' to 'socket_vmnet' in a future release")
return "user"
n = "user"
}
if n == "user" {
out.WarningT("You are using the QEMU driver without a dedicated network, which doesn't support `minikube service` & `minikube tunnel` commands.\nTo try the experimental dedicated network see: https://minikube.sigs.k8s.io/docs/drivers/qemu/#networking")
}
return n
}