12.3. 通过 NodePort 服务公开 Data Grid

使用 NodePort 服务在网络上公开 Data Grid 集群。

流程

  1. Infinispan CR 中包含 spec.expose
  2. 使用 spec.expose.type 字段将 NodePort 指定为服务类型。
  3. 配置通过 spec.expose.nodePort 字段公开 Data Grid 的端口。

    spec:
      expose:
        type: NodePort
        nodePort: 30000
  4. 应用更改。
  5. 验证 -external 服务是否可用。

    oc get services | grep external