Route是OpenShift提供的定义域名和集群中Service之间的绑定规则,将请求域名转发到对应的Service。
apiVersion: v1
kind: Route
metadata:
namespace: string # Route所在的命名空间
name: string # Route的名称
annotations: # Route负载均衡设置
haproxy.router.openshift.io/timeout: 5000ms # Route网关的超时时间
haproxy.router.openshift.io/balance: roundrobin # 支持三种负载均衡策略:RoundRobin、Leastconn、Source,默认Leastconn
spec:
host: string # Route域名
path: string # URL访问路径配置
to: # URL访问路径绑定的Service配置
kind: string
name: string
weight: string # 绑定的Service
网友评论