Skip to content

Commit

Permalink
use kurl-proxy-kotsadm nodeport in embedded-cluster installations
Browse files Browse the repository at this point in the history
  • Loading branch information
laverya committed Jan 16, 2024
1 parent f8f4479 commit b56fc1c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/embeddedcluster/node_join.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,13 @@ func GenerateK0sJoinCommand(ctx context.Context, client kubernetes.Interface, ro

// gets the port of the 'admin-console' service
func getAdminConsolePort(ctx context.Context, client kubernetes.Interface) (int32, error) {
svc, err := client.CoreV1().Services(util.PodNamespace).Get(ctx, "admin-console", metav1.GetOptions{})
svc, err := client.CoreV1().Services(util.PodNamespace).Get(ctx, "kurl-proxy-kotsadm", metav1.GetOptions{})
if err != nil {
return -1, fmt.Errorf("failed to get admin-console service: %w", err)
return -1, fmt.Errorf("failed to get kurl-proxy-kotsadm service: %w", err)
}

if len(svc.Spec.Ports) == 1 {
return svc.Spec.Ports[0].NodePort, nil
}

for _, port := range svc.Spec.Ports {
Expand Down

0 comments on commit b56fc1c

Please sign in to comment.