diff --git a/cmd/vclusterctl/cmd/connect.go b/cmd/vclusterctl/cmd/connect.go index a006b8912..03ecffcc8 100644 --- a/cmd/vclusterctl/cmd/connect.go +++ b/cmd/vclusterctl/cmd/connect.go @@ -204,7 +204,7 @@ func (cmd *ConnectCmd) Connect(vclusterName string) error { port := "" for k := range kubeConfig.Clusters { if cmd.Server != "" { - if strings.HasSuffix(cmd.Server, "https://") == false { + if strings.HasPrefix(cmd.Server, "https://") == false { cmd.Server = "https://" + cmd.Server }