You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
err=proxy.ExcludeIP(cc.KubernetesConfig.NodeIP) // to be used for http get calls
63
-
iferr!=nil {
64
-
glog.Errorf("Error excluding IP from proxy: %s", err)
65
-
}
66
62
67
-
kubectl, err:=exec.LookPath("kubectl")
68
-
iferr!=nil {
69
-
exit.WithCode(exit.NoInput, "kubectl not found in PATH, but is required for the dashboard. Installation guide: https://kubernetes.io/docs/tasks/tools/install-kubectl/")
70
-
}
71
63
api, err:=machine.NewAPIClient()
72
64
deferfunc() {
73
65
err:=api.Close()
@@ -79,6 +71,28 @@ var dashboardCmd = &cobra.Command{
79
71
iferr!=nil {
80
72
exit.WithError("Error getting client", err)
81
73
}
74
+
75
+
_, err=api.Load(pkg_config.GetMachineName())
76
+
iferr!=nil {
77
+
switcherr:=errors.Cause(err).(type) {
78
+
case mcnerror.ErrHostDoesNotExist:
79
+
console.OutStyle(console.Meh, "%q cluster does not exist", pkg_config.GetMachineName())
80
+
os.Exit(0)
81
+
default:
82
+
exit.WithError("Error getting cluster", err)
83
+
}
84
+
}
85
+
86
+
err=proxy.ExcludeIP(cc.KubernetesConfig.NodeIP) // to be used for http get calls
87
+
iferr!=nil {
88
+
glog.Errorf("Error excluding IP from proxy: %s", err)
89
+
}
90
+
91
+
kubectl, err:=exec.LookPath("kubectl")
92
+
iferr!=nil {
93
+
exit.WithCode(exit.NoInput, "kubectl not found in PATH, but is required for the dashboard. Installation guide: https://kubernetes.io/docs/tasks/tools/install-kubectl/")
94
+
}
95
+
82
96
cluster.EnsureMinikubeRunningOrExit(api, 1)
83
97
84
98
// Send status messages to stderr for folks re-using this output.
@@ -127,9 +141,9 @@ var dashboardCmd = &cobra.Command{
0 commit comments