<p>I`m trying to create an OrientDB (version 3.0.10) cluster using Kubernetes. OrientDB uses Hazelcast (version 3.10.4) in its distributed mode that is why I hat to set up KubernetesHazelcast plugin. I used <a href="https://github.com/shivahr/Scalable-OrientDB-deployment-on-Kubernetes" rel="nofollow noreferrer">this repository</a> as an example.
 I have created all the necessary configuration files, I have defined hazelcast Kubernetes dependency (version 1.3.1) in build.sbt file for my project and this dependency appeared in the classpath
However, the logs on each pod show this error message:</p>

<pre><code>com.orientechnologies.orient.server.distributed.ODistributedStartupException: Error on starting distributed plugin
Caused by: com.hazelcast.config.properties.ValidationException: There is no discovery strategy factory to create 'DiscoveryStrategyConfig{properties={service-dns=orientdbservice2.default.svc.cluster.local, service-dns-timeout=10}, className='com.hazelcast.kubernetes.HazelcastKubernetesDiscoveryStrategy', discoveryStrategyFactory=null}' Is it a typo in a strategy classname? Perhaps you forgot to include implementation on a classpath?
</code></pre>

<p>So it looks like the Hazelcast Kubernetes dependency is set up in a worng way. How can this error be fixed?</p>

<p>Here is my config hazelcast.xml file:</p>

<pre><code>   &lt;properties&gt;
        &lt;property name="hazelcast.discovery.enabled"&gt;true&lt;/property&gt;
    &lt;/properties&gt;
    &lt;network&gt;
        &lt;join&gt;
            &lt;multicast enabled="false"/&gt;
            &lt;tcp-ip enabled="false" /&gt;
            &lt;discovery-strategies&gt;
                &lt;discovery-strategy enabled="true"
                                    class="com.hazelcast.kubernetes.HazelcastKubernetesDiscoveryStrategy"&gt;

                    &lt;properties&gt;
                        &lt;property name="service-dns"&gt;orientdbservice2.default.svc.cluster.local&lt;/property&gt;
                        &lt;property name="service-dns-timeout"&gt;10&lt;/property&gt;
                    &lt;/properties&gt;
                &lt;/discovery-strategy&gt;
            &lt;/discovery-strategies&gt;
        &lt;/join&gt;
    &lt;/network&gt;
</code></pre>

<p>For the cluster creation, I use StatefulSet with OrientDB image and mount all the config files as config maps. I am pretty sure that the problem is not in my config files as with multicast instead of the dns strategy everything works fine. Also, there are no network problems in the Kubernetes cluster itself.</p>

<p>First of all, OrientDB version should be updated to the latest - 3.0.10 with embedded newest Hazelcast version. Also, I have mounted hazelcast-kubernetes.jar dependency file directly into /orientdb/lib folder and it started to work properly. HazelcastKubernetes plugin is discovered and nodes join the cluster:</p>

<pre><code>INFO  [172.17.0.3]:5701 [orientdb-test-cluster-1] [3.10.4] Kubernetes Discovery activated resolver: DnsEndpointResolver [DiscoveryService]
INFO  [172.17.0.3]:5701 [orientdb-test-cluster-1] [3.10.4] Activating Discovery SPI Joiner [Node]
INFO  [172.17.0.3]:5701 [orientdb-test-cluster-1] [3.10.4] Starting 2 partition threads and 3 generic threads (1 dedicated for priority tasks) [OperationExecutorImpl]

Members {size:3, ver:3} [
    Member [172.17.0.3]:5701 - hash
    Member [172.17.0.4]:5701 - hash
    Member [172.17.0.8]:5701 - hash
]
</code></pre>
