Ignite Cluster and Kubernetes Cluster

classic Classic list List threaded Threaded
4 messages Options
narges saleh narges saleh
Reply | Threaded
Open this post in threaded view
|

Ignite Cluster and Kubernetes Cluster

Hi All,

Is it possible to have multiple ignite clusters within a single K8 cluster (say AKS cluster)?

thanks.
pg31 pg31
Reply | Threaded
Open this post in threaded view
|

Re: Ignite Cluster and Kubernetes Cluster

Yes. You should deploy them in a different namespace.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
narges saleh narges saleh
Reply | Threaded
Open this post in threaded view
|

Re: Ignite Cluster and Kubernetes Cluster

Thanks for the reply.
So, what I need is to set TcpDiscoveryKubernetesIpFinder.namespaceName to a different namespace for each cluster and declare the namespace in theĀ  related ignite connector service yaml file?

On Wed, Feb 12, 2020 at 10:19 PM pg31 <[hidden email]> wrote:
Yes. You should deploy them in a different namespace.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
akorensh akorensh
Reply | Threaded
Open this post in threaded view
|

Re: Ignite Cluster and Kubernetes Cluster

This post was updated on .
In reply to this post by narges saleh
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 a 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/