12.4. 通过路由公开数据网格
使用 OpenShift Route
和 passthrough 加密使 Data Grid 集群在网络上可用。
流程
-
在
Infinispan
CR 中包含spec.expose
。 -
使用
spec.expose.type
字段将Route
指定为服务类型。 (可选)添加带有
spec.expose.host
字段的主机名。spec: expose: type: Route host: www.example.org
spec: expose: type: Route host: www.example.org
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 应用更改。
验证路由是否可用。
oc get routes
oc get routes
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
路由
端口
创建路由时,它会在网络上公开一个端口,该端口接受客户端连接,并将流量重定向到侦听端口 11222
的 Data Grid 服务。
可用的 路由
端口取决于您是否使用加密。
端口 | 描述 |
---|---|
| 禁用加密。 |
| 启用加密。 |