diff --git a/cmd/up.go b/cmd/up.go index ae566ef5..a63a81ed 100644 --- a/cmd/up.go +++ b/cmd/up.go @@ -120,7 +120,7 @@ func ClusterUp(ctx context.Context, dialersOptions hosts.DialersOptions, flags c return APIURL, caCrt, clientCert, clientKey, nil, err } if len(kubeCluster.ControlPlaneHosts) > 0 { - APIURL = fmt.Sprintf("https://%v:%v", kubeCluster.ControlPlaneHosts[0].Address, "6443") + APIURL = fmt.Sprintf("https://%s:6443", kubeCluster.ControlPlaneHosts[0].Address) } clientCert = string(cert.EncodeCertPEM(kubeCluster.Certificates[pki.KubeAdminCertName].Certificate)) clientKey = string(cert.EncodePrivateKeyPEM(kubeCluster.Certificates[pki.KubeAdminCertName].Key)) @@ -138,7 +138,7 @@ func ClusterUp(ctx context.Context, dialersOptions hosts.DialersOptions, flags c } // update APIURL after reconcile if len(kubeCluster.ControlPlaneHosts) > 0 { - APIURL = fmt.Sprintf("https://%v:%v", kubeCluster.ControlPlaneHosts[0].Address, "6443") + APIURL = fmt.Sprintf("https://%s:6443", kubeCluster.ControlPlaneHosts[0].Address) } if err := kubeCluster.PrePullK8sImages(ctx); err != nil {