diff --git a/pkg/client/restclient/url_utils.go b/pkg/client/restclient/url_utils.go index b98eead6f62..81f16d63eaf 100644 --- a/pkg/client/restclient/url_utils.go +++ b/pkg/client/restclient/url_utils.go @@ -36,7 +36,7 @@ func DefaultServerURL(host, apiPath string, groupVersion unversioned.GroupVersio if err != nil { return nil, "", err } - if hostURL.Scheme == "" { + if hostURL.Scheme == "" || hostURL.Host == "" { scheme := "http://" if defaultTLS { scheme = "https://"