6.3. 为 Hot Rod 创建外部路由

在 OpenShift 访问数据网格 pod 的外部热 Rod 客户端通过带有 passthrough 终止的路由。

先决条件

  • 配置 Data Grid Server 以加密客户端连接。

流程

  1. 创建具有 passthrough 终止的路由。

    $ oc create route passthrough ${ROUTE_NAME} \
      --port=hotrod \
      --service ${APPLICATION_NAME}

    例如:

    $ oc create route passthrough cache-service-hotrod-route \
      --port=hotrod \
      --service cache-service
  2. .spec.host 获取 Hot Rod 路由主机名。

    $ oc get route cache-service-hotrod-route -o jsonpath="{.spec.host}"
    
    cache-service-hotrod-route-rhdg-helloworld.192.0.2.0.nip.io