Chapter 8. Configuring network access to Data Grid


Expose Data Grid clusters so you can access Data Grid Console, the Data Grid command line interface (CLI), REST API, and Hot Rod endpoint.

8.1. Getting the service for internal connections

By default, Data Grid Operator creates a service that provides access to Data Grid clusters from clients running on OpenShift.

This internal service has the same name as your Data Grid cluster, for example:

metadata:
  name: example-infinispan
Copy to Clipboard Toggle word wrap

Procedure

  • Check that the internal service is available as follows:

    $ oc get services
    
    NAME               TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)
    example-infinispan ClusterIP   192.0.2.0        <none>        11222/TCP
    Copy to Clipboard Toggle word wrap

8.2. Exposing Data Grid through load balancers

Use a load balancer service to make Data Grid clusters available to clients running outside OpenShift.

Note

To access Data Grid with unencrypted Hot Rod client connections you must use a load balancer service.

Procedure

  1. Include spec.expose in your Infinispan CR.
  2. Specify LoadBalancer as the service type with the spec.expose.type field.
  3. Optionally specify the network port where the service is exposed with the spec.expose.port field. The default port is 7900.

    spec:
      expose:
        type: LoadBalancer
        port: 65535
    Copy to Clipboard Toggle word wrap
  4. Apply the changes.
  5. Verify that the -external service is available.

    $ oc get services | grep external
    
    NAME                         TYPE            CLUSTER-IP    EXTERNAL-IP   PORT(S)
    example-infinispan-external  LoadBalancer    192.0.2.24    hostname.com  11222/TCP
    Copy to Clipboard Toggle word wrap

8.3. Exposing Data Grid through node ports

Use a node port service to expose Data Grid clusters on the network.

Procedure

  1. Include spec.expose in your Infinispan CR.
  2. Specify NodePort as the service type with the spec.expose.type field.
  3. Configure the port where Data Grid is exposed with the spec.expose.nodePort field.

    spec:
      expose:
        type: NodePort
        nodePort: 30000
    Copy to Clipboard Toggle word wrap
  4. Apply the changes.
  5. Verify that the -external service is available.

    $ oc get services | grep external
    
    NAME                         TYPE            CLUSTER-IP       EXTERNAL-IP   PORT(S)
    example-infinispan-external  NodePort        192.0.2.24       <none>        11222:30000/TCP
    Copy to Clipboard Toggle word wrap

8.4. Exposing Data Grid through routes

Use an OpenShift Route with passthrough encryption to make Data Grid clusters available on the network.

Procedure

  1. Include spec.expose in your Infinispan CR.
  2. Specify Route as the service type with the spec.expose.type field.
  3. Optionally add a hostname with the spec.expose.host field.

    spec:
      expose:
        type: Route
        host: www.example.org
    Copy to Clipboard Toggle word wrap
  4. Apply the changes.
  5. Verify that the route is available.

    $ oc get routes
    
    NAME                 CLASS    HOSTS   ADDRESS   PORTS   AGE
    example-infinispan   <none>   *                 443     73s
    Copy to Clipboard Toggle word wrap

Route ports

When you create a route, it exposes a port on the network that accepts client connections and redirects traffic to Data Grid services that listen on port 11222.

The port where the route is available depends on whether you use encryption or not.

Expand
PortDescription

80

Encryption is disabled.

443

Encryption is enabled.

8.5. Network services

Reference information for network services that Data Grid Operator creates and manages.

8.5.1. Internal service

  • Allow Data Grid pods to discover each other and form clusters.
  • Provide access to Data Grid endpoints from clients in the same OpenShift namespace.
Expand
ServicePortProtocolDescription

<cluster_name>

11222

TCP

Internal access to Data Grid endpoints

<cluster_name>-ping

8888

TCP

Cluster discovery

8.5.2. External service

Provides access to Data Grid endpoints from clients outside OpenShift or in different namespaces.

Note

You must create the external service with Data Grid Operator. It is not available by default.

Expand
ServicePortProtocolDescription

<cluster_name>-external

11222

TCP

External access to Data Grid endpoints.

8.5.3. Cross-site service

Allows Data Grid to back up data between clusters in different locations.

Expand
ServicePortProtocolDescription

<cluster_name>-site

7900

TCP

JGroups RELAY2 channel for cross-site communication.

Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2026 Red Hat
Back to top