diff --git a/pkg/models/kubeconfig/kubeconfig.go b/pkg/models/kubeconfig/kubeconfig.go index ecb1e5f5b4648e369edcfc86f938026177a3067b..e6657478b154fef3d21982cc0b5e4489077518f3 100644 --- a/pkg/models/kubeconfig/kubeconfig.go +++ b/pkg/models/kubeconfig/kubeconfig.go @@ -181,7 +181,7 @@ func (o *operator) GetKubeConfig(username string) (string, error) { masterURL := o.masterURL // server host override - if cluster := kubeconfig.Clusters[defaultClusterName]; cluster != nil { + if cluster := kubeconfig.Clusters[defaultClusterName]; cluster != nil && masterURL != "" { cluster.Server = masterURL }