Ignite Service is used for Ignite nodes auto-discovery and as a LoadBalancer for external applications that will be connecting to an Ignite cluster.
This documentation explains how to configure and deploy the service.
KubernetesIPFinder requires users to configure and deploy a special Kubernetes service that maintains a list of the IP addresses of all the alive Ignite pods (nodes).
Every time a new Ignite pod is started, the IP finder will connect to the service via the Kubernetes API to obtain the list of the existing Ignite pods' addresses. Using these addresses, the new node will be able to discover the rest of the cluster nodes and finally join the Apache Ignite cluster.
Also, it's possible to reuse the same service as a LoadBalancer for external applications that will be connecting to the Ignite cluster.
Let's configure the service the following way considering all the requirements:
Session Affinity Property
sessionAffinityused below is required only if Ignite cluster is deployed in Kubernetes and your applications are outside of it. The property ensures that Ignite thin clients, JDBC/ODBC drivers preserve a connection with a specific Ignite pod.
If both the cluster and applications are managed by Kubernetes then the property is redundant and can be removed.
apiVersion: v1 kind: Service metadata: # The name must be equal to TcpDiscoveryKubernetesIpFinder.serviceName name: ignite # The name must be equal to TcpDiscoveryKubernetesIpFinder.namespaceName namespace: ignite spec: type: LoadBalancer ports: - name: rest port: 8080 targetPort: 8080 - name: sql port: 10800 targetPort: 10800 - name: thinclients port: 10900 targetPort: 10900 # Optional - remove 'sessionAffinity' property if the Ignite cluster # and applications deployed within Kubernetes sessionAffinity: ClientIP selector: # Must be equal to the label set for Ignite pods. app: ignite
and deploy it in Kubernetes using the command below (ensure that you configured a unique namespace and RBAC for Ignite beforehand):
kubectl create -f ignite-service.yaml
Make sure the service is up and running:
kubectl get svc ignite --namespace=ignite
Updated less than a minute ago