diff --git a/pkg/k8s/main.go b/pkg/k8s/main.go index fef73b41..c25c12fa 100644 --- a/pkg/k8s/main.go +++ b/pkg/k8s/main.go @@ -303,6 +303,9 @@ func getRestConfig(osArgs utils.OSArgs) (restConfig *rest.Config, err error) { } else { restConfig, err = rest.InClusterConfig() } + if err != nil { + return + } restConfig.WarningHandler = logger return restConfig, err }