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
logger.Warnf("Unable to create new kubectl client: %v", err)
310
-
logger.Warn("Using fake client to render resources")
311
-
logger.WriteString(logrus.WarnLevel, "\n")
312
-
313
-
kube:=fake.NewSimpleClientset()
314
-
client=&fakekube.Client{
315
-
Client: kube,
316
-
}
317
-
} else {
318
-
returnnil, errors.Errorf("error creating Kubernetes client: %v. Please make sure you have a valid Kubernetes context that points to a working Kubernetes cluster. If in doubt, please check if the following command works locally: `kubectl get namespaces`", err)
319
-
}
306
+
logger.Warnf("Unable to create new kubectl client: %v", err)
307
+
logger.WriteString(logrus.WarnLevel, "\n")
308
+
client=nil
320
309
}
321
310
322
311
// load generated config
@@ -325,11 +314,13 @@ func initialize(ctx context.Context, f factory.Factory, allowFailingKubeClient b
325
314
returnnil, errors.Errorf("error loading local cache: %v", err)
326
315
}
327
316
328
-
// If the current kube context or namespace is different than old,
329
-
// show warnings and reset kube client if necessary
returnnil, "", "", false, errors.Errorf("kube config is invalid: please make sure you have an existing valid kube config. You might want to check one of the following things:\n\n* Make sure you can use 'kubectl get namespaces' locally\n* If you are using Loft, you might want to run 'devspace create space' or 'loft create space'\n")
30
+
returnnil, "", "", false, errors.Errorf("kube config is invalid")
Copy file name to clipboardExpand all lines: pkg/devspace/pipeline/engine/pipelinehandler/commands/create_deployments.go
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -29,13 +29,17 @@ type CreateDeploymentsOptions struct {
29
29
Allbool`long:"all" description:"Deploy all deployments"`
30
30
}
31
31
32
+
constErrMsg="Please make sure you have an existing valid kube config. You might want to check one of the following things:\n\n* Make sure you can use 'kubectl get namespaces' locally\n* If you are using Loft, you might want to run 'devspace create space' or 'loft create space'\n"
0 commit comments