diff --git a/pkg/server/context.go b/pkg/server/context.go index fac72708db6a..d30f66486c21 100644 --- a/pkg/server/context.go +++ b/pkg/server/context.go @@ -59,7 +59,10 @@ func NewContext(ctx context.Context, cfg string) (*Context, error) { return nil, err } - k8s := kubernetes.NewForConfigOrDie(restConfig) + k8s, err := kubernetes.NewForConfig(restConfig) + if err != nil { + return nil, err + } return &Context{ K3s: k3s.NewFactoryFromConfigOrDie(restConfig), Helm: helm.NewFactoryFromConfigOrDie(restConfig),