Using Hazelcast Clustering with Kubernetes

Bug and problem reporting on Cyclos 4 version

Moderators: hugo, alexandre, rmvanarkel

Post Reply
Shiyghan
Posts: 39
Joined: Thu Jun 16, 2016 9:16 am
Location: London
Contact:

Using Hazelcast Clustering with Kubernetes

Post by Shiyghan »

I have upgraded to 4.8.2 on Google Compute Cloud platform using Kubernetes and modified the Hazelcast configuration file as advised at https://github.com/hazelcast/hazelcast-kubernetes to

<!-- COMMENTED OUT OLD CONFIGURATION
<join>
<!-- Multicast communication -->
<multicast enabled="true">
<multicast-group>224.2.2.3</multicast-group>
<multicast-port>54327</multicast-port>
</multicast>

<!-- Full TCP/IP communication -->
<!--
<tcp-ip enabled="true">
<member>machine1</member>
<member>machine2</member>
<member>machine3:5702</member>
</tcp-ip>
-->
</join>
<join>
COMMENT OUT OLD CONFIGURATION -->


<!-- ADDED TO SUPPORT FOR HAZELCAST DISCOVERY PLUGIN ON KUBERNETES -->
<!-- deactivate normal discovery -->
<multicast enabled="false"/>
<tcp-ip enabled="false" />

<!-- activate the Kubernetes plugin -->
<discovery-strategies>
<discovery-strategy enabled="true"
class="com.hazelcast.kubernetes.HazelcastKubernetesDiscoveryStrategy">

<properties>
<!-- configure discovery service API lookup -->
<property name="service-dns">kube-dns</property>
<property name="service-dns-timeout">10</property>
</properties>
</discovery-strategy>
</discovery-strategies>
</join>
<!-- ADDED TO SUPPORT HAZELCAST ON KUBERNETES -->

I downloaded the Hazelcast kubernetes DNS discovery plugin jar from MVN (https://mvnrepository.com/artifact/com. ... etes/1.0.0) and added it to the lib directory.

WEB-INF/lib/hazelcast-kubernetes-1.0.0.jar

Is this supported on Cyclos 4.8.2 ?
Skype senavti
Shiyghan
Posts: 39
Joined: Thu Jun 16, 2016 9:16 am
Location: London
Contact:

Re: Using Hazelcast Clustering with Kubernetes

Post by Shiyghan »

There was a typing error in the previous email. The hazelcast.xml was amended to

<join>
<!-- deactivate normal discovery -->
<multicast enabled="false"/>
<tcp-ip enabled="false" />

<!-- activate the Kubernetes plugin -->
<discovery-strategies>
<discovery-strategy enabled="true"
class="com.hazelcast.kubernetes.HazelcastKubernetesDiscoveryStrategy">

<properties>
<!-- configure discovery service API lookup -->
<property name="service-dns">kube-dns</property>
<property name="service-dns-timeout">10</property>
</properties>
</discovery-strategy>
</discovery-strategies>
</join>
Skype senavti
Shiyghan
Posts: 39
Joined: Thu Jun 16, 2016 9:16 am
Location: London
Contact:

Re: Using Hazelcast Clustering with Kubernetes

Post by Shiyghan »

Successfully got Hazelcast working with Kubernetes using StatefulSets. There is a very good set of documentation at https://kubernetes.io/docs/tutorials/st ... teful-set/
Skype senavti
Post Reply