Cluster Gateway
KubeSphere 3.4 provides cluster-scope gateways to let all projects share a global gateway. This document describes how to set a cluster gateway on KubeSphere.
Prerequisites
You need to prepare a user with the platform-admin
role, for example, admin
. For more information, see Create Workspaces, Projects, Users and Roles.
Create a Cluster Gateway
-
Log in to the KubeSphere web console as
admin
. Click Platform in the upper-left corner and select Cluster Management. -
Go to Gateway Settings under Cluster Settings from the navigation pane, select the Cluster Gateway tab, and click Enable Gateway.
-
In the displayed dialog box, select an access mode for the gateway from the following two options:
- NodePort: Access Services with corresponding node ports through the gateway. The NodePort access mode provides the following configurations:
- Tracing: Turn on the Tracing toggle to enable the Tracing feature on KubeSphere. Once it is enabled, check whether an annotation (
nginx.ingress.kubernetes.io/service-upstream: true
) is added for your route when the route is inaccessible. If not, add an annotation to your route. - Configuration Options: Add key-value pairs to the cluster gateway.
- Tracing: Turn on the Tracing toggle to enable the Tracing feature on KubeSphere. Once it is enabled, check whether an annotation (
- LoadBalancer: Access Services with a single IP address through the gateway. The LoadBalancer access mode provides the following configurations:
- Tracing: Turn on the Tracing toggle to enable the Tracing feature on KubeSphere. Once it is enabled, check whether an annotation (
nginx.ingress.kubernetes.io/service-upstream: true
) is added for your route when the route is inaccessible. If not, add an annotation to your route. - Load Balancer Provider: Select a load balancer provider from the drop-down list.
- Annotations: Add annotations to the cluster gateway.
- Configuration Options: Add key-value pairs to the cluster gateway.
- Tracing: Turn on the Tracing toggle to enable the Tracing feature on KubeSphere. Once it is enabled, check whether an annotation (
Info
- To use the Tracing feature, turn on Application Governance when you create composed applications.
- For more information about how to use configuration options, see Configuration options.
- NodePort: Access Services with corresponding node ports through the gateway. The NodePort access mode provides the following configurations:
-
Click OK to create the cluster gateway.
-
The cluster gateway created is displayed and the basic information of the gateway is also shown on the page.
Note
A gateway namedkubesphere-router-kubesphere-system
is also created, which serves as a global gateway for all projects in your cluster. -
Click Manage to select an operation from the drop-down menu:
- View Details: Go to the details page of the cluster gateway.
- Edit: Edit configurations of the cluster gateway.
- Disable: Disable the cluster gateway.
-
After a cluster gateway is created, see Routes for more information about how to create a route.
Cluster Gateway Details Page
- Under the Cluster Gateway tab, click Manage on the right of a cluster gateway and select View Details to open its details page.
- On the details page, click Edit to edit configurations of the cluster gateway or click Disable to disable the gateway.
- Click the Monitoring tab to view the monitoring metrics of the cluster gateway.
- Click the Configuration Options tab to view configuration options of the cluster gateway.
- Click the Gateway Logs tab to view logs of the cluster gateway.
- Click the Resource Status tab to view workload status of the cluster gateway. Click or to scale up or scale down the number of replicas.
- Click the Metadata tab to view annotations of the cluster gateway.
View Project Gateways
On the Gateway Settings page, click the Project Gateway tab to view project gateways.
Click on the right of a project gateway to select an operation from the drop-down menu:
- Edit: Edit configurations of the project gateway.
- Disable: Disable the project gateway.
Note
For more information about how to create project gateways, see Project Gateway.
Feedback
Was this page Helpful?
Receive the latest news, articles and updates from KubeSphere
Thanks for the feedback. If you have a specific question about how to use KubeSphere, ask it on Slack. Open an issue in the GitHub repo if you want to report a problem or suggest an improvement.