It is possible to have multiple Ignite clusters inside a K8 Cluster.
For each ignite cluster:
1. create a service that allows the pods within the ignite cluster to
identify each other.
2. put the service as as spec into the statefulset/deployment yaml.
3. put the service into the ignite discovery section.
ex(showing the first few lines of a service, statefulset, and discovery
sections):
* cluster 1 *
apiVersion: v1
kind: *Service*
metadata:
# The name must be equal to TcpDiscoveryKubernetesIpFinder.serviceName
name:* gridgain1-service*
# The name must be equal to TcpDiscoveryKubernetesIpFinder.namespace
namespace: gridgain
stateful set
----------------
apiVersion: apps/v1
kind: *StatefulSet*
metadata:
# Cluster name.
name: gridgain1-cluster
namespace: gridgain
spec:
replicas: 2
* serviceName: gridgain1*
*discovery section*
-----------------------------------
<property name="ipFinder">
<bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.kubernetes.TcpDiscoveryKubernetesIpFinder">
<property name="namespace" value="gridgain"/>
* <property name="serviceName"
value="gridgain1-service"/>*
</bean>
</property>
------------------------------------------------------------------------------------------------------
*cluster 2*
apiVersion: v1
kind: *Service*
metadata:
# The name must be equal to TcpDiscoveryKubernetesIpFinder.serviceName
name: *gridgain2-service*
# The name must be equal to TcpDiscoveryKubernetesIpFinder.namespace
namespace: gridgain
...
apiVersion: apps/v1
kind:* StatefulSet*
metadata:
# Cluster name.
name: gridgain2-cluster
namespace: gridgain
spec:
# The initial number of pods to be started by Kubernetes.
replicas: 2
serviceName:* gridgain2*
..
*discovery section*
----------------------
<property name="ipFinder">
<bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.kubernetes.TcpDiscoveryKubernetesIpFinder">
<property name="namespace" value="gridgain"/>
*<property name="serviceName"
value="gridgain2-service"/>*
</bean>
</property>
The format/full text of these files could be gotten from:
AMAZON EKS:
https://www.gridgain.com/docs/latest/installation-guide/kubernetes/amazon-eks-deployment
AZURE Kubernetes:
https://www.gridgain.com/docs/latest/installation-guide/kubernetes/azure-deployment
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/