diff --git a/pkg/controlplane/controller/kubernetesservice/controller.go b/pkg/controlplane/controller/kubernetesservice/controller.go index d8cfd44222c..eca710dc211 100644 --- a/pkg/controlplane/controller/kubernetesservice/controller.go +++ b/pkg/controlplane/controller/kubernetesservice/controller.go @@ -89,6 +89,11 @@ func (c *Controller) Start(stopCh <-chan struct{}) { runtime.HandleError(fmt.Errorf("timed out waiting for caches to sync")) return } + + // Service definition is reconciled during first run to correct port and type per expectations. + if err := c.UpdateKubernetesService(true); err != nil { + klog.Errorf("Unable to perform initial Kubernetes service initialization: %v", err) + } // Reconcile during first run removing itself until server is ready. endpointPorts := createEndpointPortSpec(c.PublicServicePort, "https") if err := c.EndpointReconciler.RemoveEndpoints(kubernetesServiceName, c.PublicIP, endpointPorts); err == nil {