From 529b5aa389812b9230e7dc2b4816f3f640fb9d78 Mon Sep 17 00:00:00 2001 From: Benn Linger Date: Thu, 30 May 2019 16:21:44 -0400 Subject: [PATCH] Fixed addon-manager failing with non-default --apiserver-port --- pkg/minikube/bootstrapper/certs.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/minikube/bootstrapper/certs.go b/pkg/minikube/bootstrapper/certs.go index bde242f453a1..2fb234a22204 100644 --- a/pkg/minikube/bootstrapper/certs.go +++ b/pkg/minikube/bootstrapper/certs.go @@ -17,6 +17,7 @@ limitations under the License. package bootstrapper import ( + "fmt" "net" "path" "path/filepath" @@ -66,7 +67,7 @@ func SetupCerts(cmd CommandRunner, k8s config.KubernetesConfig) error { kubeCfgSetup := &util.KubeConfigSetup{ ClusterName: k8s.NodeName, - ClusterServerAddress: "https://localhost:8443", + ClusterServerAddress: fmt.Sprintf("https://localhost:%d", k8s.NodePort), ClientCertificate: path.Join(util.DefaultCertPath, "apiserver.crt"), ClientKey: path.Join(util.DefaultCertPath, "apiserver.key"), CertificateAuthority: path.Join(util.DefaultCertPath, "ca.crt"),