This section describes how to access the backend service of an Ingress.

After an Ingress is created, you can access its backend service using any HTTP or HTTPS client. Depending on the external access mode of the cluster gateway or project gateway, you can use the following access methods:

  • If the external access mode of the cluster gateway or project gateway is NodePort, you can access the backend service of the Ingress using the domain name, path, and port number (e.g., example.com/test:30240).

  • If the external access mode of the cluster gateway or project gateway is LoadBalancer, you can access the backend service of the Ingress using the domain name and path (e.g., example.com/test).

The following only demonstrates how to test whether the Ingress is correctly configured in the KubeSphere web console.

Prerequisites

  • You need to join a project and have the Application Workloads View permission in the project. For more information, see Project Members and Project Roles.

  • The KubeSphere Gateway extension must be installed and enabled on the KubeSphere platform, and then the cluster gateway or project gateway must be enabled. For more information, refer to KubeSphere Gateway.

  • The client must resolve the domain name to the gateway IP address via the local hosts file or a DNS service.

  • The client must be able to connect to the gateway IP address over the network. For more information, contact your network environment administrator.

Steps

  1. Log in to the KubeSphere web console with a user who has Application Workloads View permissions and enter your workspace.

  2. Click Application Workloads > Ingress in the left navigation pane.

  3. Select a project from the drop-down list in the upper left corner of the page.

  4. In the application route list, click the name of an Ingress to open its details page.

  5. On the Resource Status tab, click Access Service on the right side of the routing rule you need to access.

    If the Ingress is configured correctly, the browser will display the response information from the backend service.