Questo contenuto non è disponibile nella lingua selezionata.

Chapter 6. Creating Network Services


Network services provide access to Data Grid clusters for client connections.

6.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 in OpenShift.

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

metadata:
  name: example-rhdatagrid
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-rhdatagrid ClusterIP   192.0.2.0        <none>        11222/TCP
    Copy to Clipboard Toggle word wrap

Reference

6.2. Exposing Data Grid to External Clients

Expose Data Grid clusters to clients running outside OpenShift with external services.

Procedure

  • Specify an external service type with spec.expose.type in your Infinispan CR and then apply the changes.

    spec:
      ...
      expose: 
    1
    
        type: LoadBalancer 
    2
    
        nodePort: 30000 
    3
    Copy to Clipboard Toggle word wrap
    1
    Exposes an external service.
    2
    Specifies either a LoadBalancer or NodePort service resource type.
    3
    Defines the port where the external service is exposed. If you do not define a port, and the service type is NodePort, the platform selects a port to use. If the service type is LoadBalancer, the exposed port is 11222 by default.
LoadBalancer

Use for OpenShift clusters where a load balancer service is available to handle external network traffic. You can then use the URL for the load balancer service for client connections.

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

NodePort
Use for local OpenShift clusters.

Verification

  • Check that the -external service is available.
$ oc get services | grep external

NAME                         TYPE            CLUSTER-IP       EXTERNAL-IP   PORT(S)
example-rhdatagrid-external  LoadBalancer    192.0.2.24       <none>        11222/TCP
Copy to Clipboard Toggle word wrap

Reference

Torna in cima
Red Hat logoGithubredditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi. Esplora i nostri ultimi aggiornamenti.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

Theme

© 2025 Red Hat