<p>I am trying to use Hazelcast on Kubernetes. For that the Docker is installed on Windows and Kubernetes environment is simulate on the Docker. Here is the config file <code>hazelcast.xml</code></p>
<pre class="lang-xml prettyprint-override"><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;hazelcast
    xsi:schemaLocation=&quot;http://www.hazelcast.com/schema/config hazelcast-config-3.7.xsd&quot;
    xmlns=&quot;http://www.hazelcast.com/schema/config&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&gt;

    &lt;properties&gt;
        &lt;property name=&quot;hazelcast.discovery.enabled&quot;&gt;true&lt;/property&gt;
    &lt;/properties&gt;


    &lt;network&gt;
        &lt;join&gt;
            &lt;multicast enabled=&quot;false&quot; /&gt;
            &lt;tcp-ip enabled=&quot;false&quot;/&gt;
                
            &lt;discovery-strategies&gt;
                &lt;discovery-strategy enabled=&quot;true&quot;
                    class=&quot;com.hazelcast.kubernetes.HazelcastKubernetesDiscoveryStrategy&quot;&gt;
                    &lt;!-- 
                &lt;properties&gt;
                    
                    &lt;property name=&quot;service-dns&quot;&gt;cobrapp.default.endpoints.cluster.local&lt;/property&gt;
                    &lt;property name=&quot;service-dns-timeout&quot;&gt;10&lt;/property&gt;
                  &lt;/properties&gt;
                  --&gt;
                &lt;/discovery-strategy&gt;
              &lt;/discovery-strategies&gt;
        &lt;/join&gt;
    &lt;/network&gt;
&lt;/hazelcast&gt;
</code></pre>
<p>The problem is that it is unable to create cluster on the simulated environment. According to my deploment file it should create three clusters. Here is the deployment config file</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: test-deployment
  labels:
    app: test
spec:
  replicas: 3
  selector:
    matchLabels:
      app: test
  template:
    metadata:
      labels:
        app: test
    spec:
      containers:
      - name: test
        imagePullPolicy: Never
        image: testapp:latest
        ports:
        - containerPort: 5701
        - containerPort: 8085

---
apiVersion: v1
kind: Service
metadata:
  name: test-service
spec:
  selector:
    app: test
  type: LoadBalancer
  ports:
    - name: hazelcast
      port: 5701
    - name: test
      protocol: TCP
      port: 8085
      targetPort: 8085
</code></pre>
<p>The output upon executing the deployment file</p>
<pre><code>Members [1] {
        Member [10.1.0.124]:5701 this
}
</code></pre>
<p>However the expected output is, it should have three clusters in it as per the deployment file. If anybody can help?</p>

nee nee
<p>Hazelcast's default multicast discovery doesn't work on Kubernetes out-of-the-box. You need an additional plugin for that. Two alternatives are available, Kubernetes API and DNS lookup.</p>
<p>Please check <a href="https://github.com/hazelcast/hazelcast-kubernetes" rel="nofollow noreferrer">the relevant documentation</a> for more information.</p>
