Add an Ingress for a Composed App
This section describes how to add an Ingress for a composed app.
Prerequisites
You need to join a project and have the Service Mesh Management permission in the project. For more information, see Project Members and Project Roles.
Steps
-
Log in to the KubeSphere web console with a user who has Service Mesh Management permissions and enter your workspace.
-
Click Grayscale Release > Composed Apps in the left navigation pane.
-
Select a project from the drop-down list in the upper left corner of the page.
-
On the Composed Apps page, click the name of an app to open its details page.
-
On the app details page, click Operation > Add Ingress.
-
On the Basic Information tab, set the basic information for the Ingress, then click Next.
Parameter Description Name
The name of the Ingress. The name can only contain lowercase letters, numbers, and hyphens (-), must start and end with a lowercase letter or number, and can be up to 253 characters long.
Alias
The alias of the Ingress. Different Ingresses can have the same alias.
Description
The description of the Ingress. The description can contain any characters and can be up to 256 characters long.
-
On the Routing Rules tab, click Add Routing Rule, set the routing rule parameters, then click Next.
-
Click Add Routing Rule to set a routing rule. You can set multiple routing rules, each corresponding to a domain name.
-
Hover over a created routing rule, then click
on the right to edit the routing rule settings.
-
Hover over a created routing rule, then click
on the right to delete the routing rule.
Parameter Description Domain Name
User-defined domain name.
Protocol
Protocol supported by the Ingress. The parameter value can be HTTP or HTTPS.
Secret
When the Ingress protocol is HTTPS, the Secret used to provide the certificate and key. This Secret must contain the tls.cert and tls.key fields, storing the Base64-encoded certificate and private key respectively.
Path
Domain path and its mapping relationship with the service port.
-
Click Add to set multiple paths.
-
Click
on the right of a created path to delete the path.
-
-
On the Advanced Settings tab, set labels and annotations for the Ingress, then click Create.
-
Click Add to set multiple labels or annotations.
-
Click
on the right side of a created label or annotation to delete it.
Note KubeSphere’s cluster gateway and project gateway are implemented based on the Nginx Ingress Controller. You can set annotations on the Ingress to control the gateway’s behavior. For more information, please refer to the Nginx Ingress Controller official documentation.
After the Ingress is created, it will be displayed in the Ingress list.
-