From 2b4609e265e9a2f1c38d20bccb7c79b532361436 Mon Sep 17 00:00:00 2001 From: Leonard Cohnen Date: Mon, 16 Oct 2023 19:15:17 +0200 Subject: [PATCH] always use lb for joining --- bootstrapper/internal/kubernetes/kubernetes.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bootstrapper/internal/kubernetes/kubernetes.go b/bootstrapper/internal/kubernetes/kubernetes.go index 952d2e2b0d..cb8ee8f47e 100644 --- a/bootstrapper/internal/kubernetes/kubernetes.go +++ b/bootstrapper/internal/kubernetes/kubernetes.go @@ -209,6 +209,9 @@ func (k *KubeWrapper) JoinCluster(ctx context.Context, args *kubeadm.BootstrapTo return fmt.Errorf("retrieving own instance metadata: %w", err) } + // override join endpoint to go over lb + args.APIServerEndpoint = net.JoinHostPort(loadBalancerHost, loadBalancerPort) + log.With( zap.String("nodeName", nodeName), zap.String("providerID", providerID),