mirror of
https://github.com/kubesphere/website.git
synced 2025-12-26 00:12:48 +00:00
Merge pull request #2122 from Felixnoo/update-config-opt
Update Gateway Docs
This commit is contained in:
commit
0339620751
|
|
@ -8,23 +8,27 @@ weight: 13500
|
|||
|
||||
A gateway in a KubeSphere project is an [NGINX Ingress controller](https://www.nginx.com/products/nginx/kubernetes-ingress-controller). KubeSphere has a built‑in configuration for HTTP load balancing, called [Routes](../../project-user-guide/application-workloads/routes/). A Route defines rules for external connections to Services within a cluster. Users who need to provide external access to their Services create a Route resource that defines rules, including the URI path, backing service name, and other information.
|
||||
|
||||
This tutorial demonstrates how to set a gateway in KubeSphere for external access to Services and Routes.
|
||||
In addition to project gateways, KubeSphere also supports [cluster-scope gateway](../../cluster-administration/cluster-settings/cluster-gateway/) to let all projects share a global gateway.
|
||||
|
||||
This tutorial demonstrates how to enable a project gateway on KubeSphere for external access to Services and Routes.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
You need to create a workspace, a project and a user (`project-admin`). The user must be invited to the project with the role of `admin` at the project level. For more information, see [Create Workspaces, Projects, Users and Roles](../../../docs/quick-start/create-workspace-and-project/).
|
||||
|
||||
## Set a Gateway
|
||||
## Enable a Gateway
|
||||
|
||||
1. Log in to the KubeSphere web console as `project-admin` and go to your project. In **Project Settings** from the navigation bar, click **Gateway Settings**.
|
||||
|
||||
2. Click **Set Gateway**. In the pop-up window, you can select two access modes for the gateway.
|
||||
2. Click **Enable Gateway**. In the pop-up window, you can select two access modes for the gateway.
|
||||
|
||||
**NodePort**: You can access Services with corresponding node ports through the gateway.
|
||||
|
||||
**LoadBalancer**: You can access Services with a single IP address through the gateway.
|
||||
|
||||
3. You can also enable **Application Governance** on the **Set Gateway** page. You need to enable **Application Governance** so that you can use the Tracing feature and use [different grayscale release strategies](../../project-user-guide/grayscale-release/overview/). Once it is enabled, check whether an annotation (for example, `nginx.ingress.kubernetes.io/service-upstream: true`) is added for your route (Ingress) if the route is inaccessible.
|
||||
3. You can also enable **Tracing** on the **Enable Gateway** page. You have to turn on **Application Governance** when you create composed applications so that you can use the Tracing feature and use [different grayscale release strategies](../../project-user-guide/grayscale-release/overview/). Once it is enabled, check whether an annotation (for example, `nginx.ingress.kubernetes.io/service-upstream: true`) is added for your route (Ingress) if the route is inaccessible.
|
||||
|
||||
3. In **Configuration Options**, add key-value pairs to provide configurations for system components of NGINX Ingress controller. For more information, see [NGINX Ingress Controller documentation](https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/#configuration-options).
|
||||
|
||||
4. After you select an access method, click **OK**.
|
||||
|
||||
|
|
|
|||
|
|
@ -8,17 +8,17 @@ weight: 13500
|
|||
|
||||
KubeSphere 项目中的网关是一个[ NGINX Ingress 控制器](https://www.nginx.com/products/nginx-ingress-controller/)。KubeSphere 内置的用于 HTTP 负载均衡的机制称为[应用路由](../../project-user-guide/application-workloads/routes/),它定义了从外部到集群服务的连接规则。如需允许从外部访问服务,用户可创建路由资源来定义 URI 路径、后端服务名称等信息。
|
||||
|
||||
在 KubeSphere 3.0,项目网关单独运行,即每个项目都有自己的 Ingress 控制器。在下一个发布版本中,KubeSphere 除了提供项目范围的网关外,还将提供集群范围的网关,使得所有项目都能共享相同的网关。
|
||||
KubeSphere 除了提供项目范围的网关外,还提供[集群范围的网关](../../cluster-administration/cluster-settings/cluster-gateway/),使得所有项目都能共享全局网关。
|
||||
|
||||
本教程演示如何在 KubeSphere 中设置网关以从外部访问服务和路由。
|
||||
本教程演示如何在 KubeSphere 中开启项目网关以从外部访问服务和路由。
|
||||
|
||||
## 准备工作
|
||||
|
||||
您需要创建一个企业空间、一个项目和一个用户 (`project-admin`)。该用户必须被邀请至项目,并且在项目中的角色为 `admin`。有关更多信息,请参见[创建企业空间、项目、用户和角色](../../../docs/quick-start/create-workspace-and-project/)。
|
||||
|
||||
## 设置网关
|
||||
## 开启网关
|
||||
|
||||
1. 以 `project-admin` 用户登录 KubeSphere Web 控制台,进入您的项目,从左侧导航栏进入**项目设置**下的**高级设置**页面,然后点击**设置网关**。
|
||||
1. 以 `project-admin` 用户登录 KubeSphere Web 控制台,进入您的项目,从左侧导航栏进入**项目设置**下的**网关设置**页面,然后点击**开启网关**。
|
||||
|
||||

|
||||
|
||||
|
|
@ -30,7 +30,9 @@ KubeSphere 项目中的网关是一个[ NGINX Ingress 控制器](https://www.ngi
|
|||
|
||||
**LoadBalancer**:通过网关访问服务的单独 IP 地址。
|
||||
|
||||
3. 在**设置网关**对话框,您可以启用**应用治理**以使用 Tracing 功能和[不同的灰度发布策略](../../project-user-guide/grayscale-release/overview/)。如果启用**应用治理**后无法访问路由,请在路由 (Ingress) 中添加注解(例如 `nginx.ingress.kubernetes.io/service-upstream: true`)。
|
||||
3. 在**开启网关**对话框,您可以启用**链路追踪**。创建自制应用时,您必须开启**应用治理**,以使用链路追踪功能和[不同的灰度发布策略](../../project-user-guide/grayscale-release/overview/)。如果启用**应用治理**后无法访问路由,请在路由 (Ingress) 中添加注解(例如 `nginx.ingress.kubernetes.io/service-upstream: true`)。
|
||||
|
||||
3. 在**配置选项**中,添加键值对,为 NGINX Ingress 控制器的系统组件提供配置信息。有关更多信息,请参阅 [NGINX Ingress 控制器官方文档](https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/#configuration-options)。
|
||||
|
||||
4. 选择访问方式后点击**保存**。
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue