# Facing cluster formation between pods of running weaviate using kubeadm on EC2

**URL:** <https://forum.weaviate.io/t/facing-cluster-formation-between-pods-of-running-weaviate-using-kubeadm-on-ec2/9917>\
**Category:** Support\
**Created:** [January 28, 2025, 3:43am UTC](https://forum.weaviate.io/t/facing-cluster-formation-between-pods-of-running-weaviate-using-kubeadm-on-ec2/9917 "2025-01-28T03:43:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![VINCENT\_NADAR](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/vincent_nadar/32/3444_2.png) [@VINCENT\_NADAR](https://forum.weaviate.io/u/VINCENT_NADAR)\
**Post date:** [January 28, 2025, 3:43am UTC](https://forum.weaviate.io/t/facing-cluster-formation-between-pods-of-running-weaviate-using-kubeadm-on-ec2/9917/1 "2025-01-28T03:43:13Z")

</div>

@DudaNogueira,  
I have deployed Weaviate using Kubeadm on a cluster hosted on an EC2 instance. The setup consists of 1 master node and 1 worker node. On the worker node, I deployed 2 pods using a StatefulSet deployment. Both pods are running and accessible, but they are not forming a cluster. Additionally, I want to replicate data across the pods. Is it possible to achieve this with a StatefulSet deployment, where each pod has its own storage?

Regarding the cluster formation issue, I’m unsure what the problem might be. Below are the StatefulSet and Service files I used for this deployment.

apiVersion: apps/v1  
kind: StatefulSet  
metadata:  
name: weaviate  
namespace: weaviate-v3  
spec:  
serviceName: weaviate-headless  
replicas: 2  
selector:  
matchLabels:  
app: weaviate  
template:  
metadata:  
labels:  
app: weaviate  
spec:  
containers:  
- name: weaviate  
image: [cr.weaviate.io/semitechnologies/weaviate:1.28.2](http://cr.weaviate.io/semitechnologies/weaviate:1.28.2)  
ports:  
- containerPort: 8080  
name: http  
- containerPort: 50051  
name: grpc  
- containerPort: 7946  
name: gossip  
- containerPort: 7947  
name: data  
command:  
- /bin/weaviate  
args:  
- --host  
- “0.0.0.0”  
- --port  
- “8080”  
- --scheme  
- “http”  
env:  
- name: QUERY\_DEFAULTS\_LIMIT  
value: “25”  
- name: AUTHENTICATION\_ANONYMOUS\_ACCESS\_ENABLED  
value: “true”  
- name: PERSISTENCE\_DATA\_PATH  
value: “/var/lib/weaviate”  
- name: DEFAULT\_VECTORIZER\_MODULE  
value: “none”  
- name: ENABLE\_MODULES  
value: “”  
- name: CLUSTER\_HOSTNAME  
valueFrom:  
fieldRef:  
fieldPath: metadata.name  
- name: CLUSTER\_GOSSIP\_PEERS  
value: “weaviate-0.weaviate-headless.weaviate-v3.svc.cluster.local,weaviate-1.weaviate-headless.weaviate-v3.svc.cluster.local”  
- name: CLUSTER\_JOIN  
value: “true”  
- name: RAFT\_JOIN  
value: “true”  
- name: CLUSTER\_GOSSIP\_BIND\_PORT  
value: “7946”  
- name: CLUSTER\_GOSSIP\_ADVERTISE\_PORT  
value: “7946”  
- name: CLUSTER\_DATA\_BIND\_PORT  
value: “7947”  
- name: CLUSTER\_DATA\_ADVERTISE\_PORT  
value: “7947”  
volumeMounts:  
- name: data  
mountPath: /var/lib/weaviate  
resources:  
requests:  
memory: “512Mi”  
cpu: “200m”  
limits:  
memory: “1Gi”  
cpu: “500m”  
volumeClaimTemplates:

- metadata:  
name: data  
spec:  
accessModes: [“ReadWriteOnce”]  
storageClassName: ebs-gp3  
resources:  
requests:  
storage: 2Gi

apiVersion: v1  
kind: Service  
metadata:  
name: weaviate-headless  
namespace: weaviate-v3  
spec:  
clusterIP: None  
selector:  
app: weaviate  
ports:  
- port: 8080  
targetPort: 8080  
name: http  
- port: 50051  
targetPort: 50051  
name: grpc  
- port: 8300  
targetPort: 8300  
name: raft  
- port: 7946  
targetPort: 7946  
name: gossip  
- port: 7947  
targetPort: 7947  
name: data

Can you tell me where I am going wrong or the approach I am taking is wrong?

---

<div class="post-metadata">

**Author:** ![akshay\_madiwale](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/akshay_madiwale/32/1690_2.png) [@akshay\_madiwale](https://forum.weaviate.io/u/akshay_madiwale)\
**Post date:** [February 10, 2025, 9:48am UTC](https://forum.weaviate.io/t/facing-cluster-formation-between-pods-of-running-weaviate-using-kubeadm-on-ec2/9917/2 "2025-02-10T09:48:43Z")

</div>

> [@VINCENT\_NADAR](#):
>
> CLUSTER\_DATA\_ADVERTISE\_PORT

I am also facing same issue

---

<div class="post-metadata">

**Author:** ![Shahin](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/shahin/32/7944_2.png) [@Shahin](https://forum.weaviate.io/u/Shahin)\
**Post date:** [February 10, 2025, 10:04am UTC](https://forum.weaviate.io/t/facing-cluster-formation-between-pods-of-running-weaviate-using-kubeadm-on-ec2/9917/3 "2025-02-10T10:04:37Z")

</div>

Hello @VINCENT_NADAR, @akshay_madiwale,

Welcome to our community, it’s great to have you here!

I’m not sure if you’ve managed to resolve the issue yet, but I haven’t personally tested this setup as you are trying to achieve. However, based on our documentation:

> **[Docker | Weaviate](https://weaviate.io/developers/weaviate/installation/docker-compose#multi-node-configuration)**
>
> Weaviate supports deployment with Docker.

Those steps are essential for multinode:

1. Configure one node as a “founding” member
2. Set CLUSTER\_JOIN for the other nodes in the cluster
3. Define CLUSTER\_GOSSIP\_BIND\_PORT and CLUSTER\_DATA\_BIND\_PORT for each node
4. Set RAFT\_JOIN and RAFT\_BOOTSTRAP\_EXPECT to specify the number of voters
5. Optionally, use CLUSTER\_HOSTNAME to define node names

Example for the founding member:

```auto
CLUSTER_JOIN: 'weaviate-node-1:7100' # This must be the service name of the founding member node.

```

If you haven’t already, try running through these steps again to ensure everything is set up correctly.

Regards,  
Mohamed Shahin  
Weaviate Support

---

<div class="post-metadata">

**Author:** ![VINCENT\_NADAR](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/vincent_nadar/32/3444_2.png) [@VINCENT\_NADAR](https://forum.weaviate.io/u/VINCENT_NADAR)\
**Post date:** [February 17, 2025, 8:20am UTC](https://forum.weaviate.io/t/facing-cluster-formation-between-pods-of-running-weaviate-using-kubeadm-on-ec2/9917/4 "2025-02-17T08:20:20Z")

</div>

My setup consists of one master node and one worker node. I am attempting to deploy multiple pods on the single worker node, but I am facing issues with cluster formation between the pods and data replication among the pods. I am using Kubernetes to deploy pods, with StatefulSet and service files mentioned in the first post. Could you please assist me in configuring the first pod as the leader and having the other pods join as followers of that initial pod?
