Package org.apache.ignite.client
Class ThinClientKubernetesAddressFinder
- java.lang.Object
-
- org.apache.ignite.client.ThinClientKubernetesAddressFinder
-
- All Implemented Interfaces:
ClientAddressFinder
public class ThinClientKubernetesAddressFinder extends Object implements ClientAddressFinder
Address finder for automatic lookup of Ignite server nodes running in Kubernetes environment. All Ignite nodes have to be deployed as Kubernetes pods in order to be found. Applications and Ignite nodes running outside of Kubernetes will not be able to reach the containerized counterparts.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 Summary
Constructors Constructor Description ThinClientKubernetesAddressFinder(KubernetesConnectionConfiguration cfg)ThinClientKubernetesAddressFinder(KubernetesConnectionConfiguration cfg, int port)
-
-
-
Constructor Detail
-
ThinClientKubernetesAddressFinder
public ThinClientKubernetesAddressFinder(KubernetesConnectionConfiguration cfg)
- Parameters:
cfg- Kubernetes connection configuration.
-
ThinClientKubernetesAddressFinder
public ThinClientKubernetesAddressFinder(KubernetesConnectionConfiguration cfg, int port)
- Parameters:
cfg- Kubernetes connection configuration.port- Port that Ignite uses to listen client connections.
-
-
Method Detail
-
getAddresses
public String[] getAddresses()
- Specified by:
getAddressesin interfaceClientAddressFinder
-
-