diff --git a/cmd/minikube/cmd/stop.go b/cmd/minikube/cmd/stop.go index fef1b5674cea..6990fdc23daf 100644 --- a/cmd/minikube/cmd/stop.go +++ b/cmd/minikube/cmd/stop.go @@ -130,6 +130,10 @@ func stopProfile(profile string) int { api, cc := mustload.Partial(profile) defer api.Close() + if err := killMountProcess(); err != nil { + out.WarningT("Unable to kill mount process: {{.error}}", out.V{"error": err}) + } + for _, n := range cc.Nodes { machineName := config.MachineName(*cc, n) @@ -139,10 +143,6 @@ func stopProfile(profile string) int { } } - if err := killMountProcess(); err != nil { - out.WarningT("Unable to kill mount process: {{.error}}", out.V{"error": err}) - } - if !keepActive { if err := kubeconfig.DeleteContext(profile, kubeconfig.PathFromEnv()); err != nil { exit.Error(reason.HostKubeconfigDeleteCtx, "delete ctx", err)