public class ThinClientKubernetesAddressFinder extends Object implements ClientAddressFinder
The implementation is based on a distinct Kubernetes service. The name of the service must be set with
KubernetesConnectionConfiguration
. As for Ignite pods, it's recommended to label them in such a way that
the service will target only server nodes.
The address finder, in its turn, will call this service to retrieve Ignite pods IP addresses. The port is set with value passed to constructor. Make sure that all Ignite pods occupy a similar ClientConnector port, otherwise they will not be able to connect each other using this address finder.
Constructor and Description |
---|
ThinClientKubernetesAddressFinder(KubernetesConnectionConfiguration cfg) |
ThinClientKubernetesAddressFinder(KubernetesConnectionConfiguration cfg,
int port) |
Modifier and Type | Method and Description |
---|---|
String[] |
getAddresses()
Get addresses of Ignite server nodes within a cluster.
|
public ThinClientKubernetesAddressFinder(KubernetesConnectionConfiguration cfg)
cfg
- Kubernetes connection configuration.public ThinClientKubernetesAddressFinder(KubernetesConnectionConfiguration cfg, int port)
cfg
- Kubernetes connection configuration.port
- Port that Ignite uses to listen client connections.public String[] getAddresses()
ClientConnectorConfiguration.DFLT_PORT
,
ClientConnectorConfiguration.DFLT_PORT_RANGE
.getAddresses
in interface ClientAddressFinder
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.16.0 Release Date : December 15 2023