Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-76399

custom-admin-kubeconfig ignores NodePort in servicePublishingStrategy and defaults to port 6443

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 4.20
    • HyperShift
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      When configuring a custom DNS name for the Kube API Server using spec.kubeAPIServerDNSName, it generates a custom-admin-kubeconfig.
      
      Even when the HostedCluster is explicitly configured to use a NodePort publishing strategy (where the port is defined in status.controlPlaneEndpoint.port), the generated custom kubeconfig ignores this value and defaults the server URL to port 6443.

      Version-Release number of selected component (if applicable):

          HCP 4.20.6

      How reproducible:

      100%

      Steps to Reproduce:

      1. Create a HostedCluster with APIServer service strategy set to NodePort.
      2. Define spec.kubeAPIServerDNSName with a custom FQDN (e.g., api-custom.example.com).
      3. Provide the necessary servingCerts configuration.
      4. Extract the generated secret <cluster-name>-custom-admin-kubeconfig.
      5. Check the server: entry in the kubeconfig.     

      Actual results:

      The kubeconfig server URL defaults to 6443:
      https://api-custom.example.com:6443    

      Expected results:

      The kubeconfig server URL should respect the NodePort assigned to the APIServer service:
      https://api-custom.example.com:<nodeport_value>    

      Additional info:

       

              Unassigned Unassigned
              rhn-support-dpateriy Divyam Pateriya
              None
              None
              Yu Li Yu Li
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: