创建应用路由
This section describes how to create an Ingress.
Prerequisites
Steps
-
以具有应用负载管理权限的用户登录 KubeSphere Web 控制台并进入您的集群或项目。
-
Click 应用负载 > 应用路由 in the left navigation pane.
-
Click Create on the page.
-
在基本信息页签,设置应用路由的基本信息,然后点击下一步。
参数 描述 名称
应用路由的名称。名称只能包含小写字母、数字和连字符(-),必须以小写字母或数字开头和结尾,最长 253 个字符。
别名
应用路由的别名。不同应用路由的别名可以相同。别名只能包含中文、字母、数字和连字符(-),不得以连字符(-)开头或结尾,最长 63 个字符。
描述
应用路由的描述。描述可包含任意字符,最长 256 个字符。
-
在路由规则页签,点击添加路由规则,设置路由规则参数,然后点击下一步。
-
Click Add Routing Rule to set routing rules. You can set multiple routing rules, each corresponding to a domain name.
-
Hover the cursor over a created routing rule, then click on the right side to edit the routing rule settings.
-
Hover the cursor over a created routing rule, then click on the right side to delete the routing rule.
Parameter Description Domain
The user-defined domain name.
Protocol
The protocol supported by the Ingress. The value can be HTTP or HTTPS.
Secret
The Secret used to provide the certificate and key when the Ingress protocol is HTTPS. This Secret must contain the tls.cert and tls.key fields, which store the Base64-encoded certificate and private key, respectively.
Path
The domain path and its mapping relationship with the service port.
-
Click Add to set multiple paths.
-
Click on the right side of a created path to delete the path.
-
-
在高级设置页签,为应用路由设置标签和注解,然后点击创建。
-
点击添加可设置多条标签或注解。
-
在已创建的标签或注解右侧点击可删除标签或注解。
Note The cluster gateway and project gateway in KubeSphere are implemented based on Nginx Ingress Controller. You can set annotations on the Ingress to control the behavior of the gateway. For more information, see Nginx Ingress Controller Documentation.
说明 安装“KubeSphere 网关”扩展组件,并启用集群网关、企业空间网关、或项目网关后,创建应用路由时,需要在高级设置页签选择对应网关的 IngressClassName。
应用路由创建完成后将显示在应用路由列表中。
-
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.