If the Gateway Logs tab on the Cluster Gateway details page of a member cluster does not display data, you can use the following method to resolve it.

  1. Enable NodePort access mode for the whizard-telemetry-apiserver service on the host cluster.

    1. Under the Application Workloads menu of the host cluster, click Services to enter the Services page.

    2. Search for the service whizard-telemetry-apiserver, click more > Edit External Access.

    3. In the Edit External Access dialog box, select NodePort, then click OK.

  2. Modify the extension configuration of the KubeSphere gateway, setting backend.config.gateway.logSearchEndpoint to the access address of the whizard-telemetry-apiserver service on the host cluster.

    backend:
      enabled: true
      config:
        gateway:
          namespace: kubesphere-controls-system
          valuesOverride:
            controller:
              image:
                registry: ""
                image: kubesphereio/nginx-ingress-controller
                tag: "v1.4.0"
                pullPolicy: IfNotPresent
                digest: ""
          exposeNodeLabelKey: "node-role.kubernetes.io/control-plane"
          versionConstraint: ">= 4.3.0, < 4.5.0"
          logSearchEndpoint: "http://whizard-telemetry-apiserver.extension-whizard-telemetry.svc:9090" # Replace with http://<node-ip>:<whizard-telemetry-apiserver-nodeport>
  3. Restart the gateway gateway-agent-backend-apiserver on the member cluster.

    kubectl -n extension-gateway rollout restart deploy gateway-agent-backend-apiserver
  4. Refresh the Gateway Logs tab of the member cluster, and you will see the gateway log data.