@chirag-phlo Did you manage to get it to work? I am also trying this locally.
macOS + docker + minikube + helm (very similar to Achieve Zero-Downtime Upgrades with Weaviate’s Multi-Node Setup | Weaviate) where I want to retry replication = 3. For each node, I want their /var/lib/weaviate to map to an external disk with different folders named like /Volumes/My_Disk/weaviate-node-0 , …/weaviate-node-1, …/weaviate-node-2
here’s the section I changed for values.yaml:
# The Persistent Volume Claim settings for Weaviate. If there's a
# storage.fullnameOverride field set, then the default pvc will not be
# created, instead the one defined in fullnameOverride will be used
storage:
size: 50Gi
storageClassName: ""
existingClaim: true
fullnameOverride: "weaviate-pvc" # Explicitly disable the default PVC creation
# Add the extraVolumes and extraVolumeMounts sections to use your manually created PVCs
extraVolumes:
- name: weaviate-data-0
persistentVolumeClaim:
claimName: weaviate-pvc-0
- name: weaviate-data-1
persistentVolumeClaim:
claimName: weaviate-pvc-1
- name: weaviate-data-2
persistentVolumeClaim:
claimName: weaviate-pvc-2
extraVolumeMounts:
- name: weaviate-data-0
mountPath: /var/lib/weaviate
subPath: node-0
- name: weaviate-data-1
mountPath: /var/lib/weaviate
subPath: node-1
- name: weaviate-data-2
mountPath: /var/lib/weaviate
subPath: node-2
and my pvs.yaml:
apiVersion: v1
kind: PersistentVolume
metadata:
name: weaviate-pv-0
spec:
capacity:
storage: 50Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/Volumes/My_Disk/weaviate-node-0"
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: weaviate-pv-1
spec:
capacity:
storage: 50Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/Volumes/My_Disk/weaviate-node-1"
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: weaviate-pv-2
spec:
capacity:
storage: 50Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/Volumes/My_Disk/weaviate-node-2"
and pvcs.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: weaviate-pvc-0
namespace: weaviate
spec:
storageClassName: "" # Add this line
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 50Gi
volumeName: weaviate-pv-0
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: weaviate-pvc-1
namespace: weaviate
spec:
storageClassName: "" # Add this line
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 50Gi
volumeName: weaviate-pv-1
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: weaviate-pvc-2
namespace: weaviate
spec:
storageClassName: "" # Add this line
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 50Gi
volumeName: weaviate-pv-2
note that the only diff is I added the namespace in pvcs.yaml (I also tried without it, and other variations in other parts). And like @chirag-phlo, it also resulted in that weaviate-data-weaviate-0 PV getting created and assigned, which isnt right.
kubectl get pvc -n weaviate
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS VOLUMEATTRIBUTESCLASS AGE
weaviate-data-weaviate-0 Bound pvc-f42cdf50-e227-4339-90e9-0afc929ac2b2 50Gi RWO standard <unset> 4m5s
weaviate-data-weaviate-1 Bound pvc-a556ed20-9455-4712-a155-a06cc25d9fdd 50Gi RWO standard <unset> 4m5s
weaviate-data-weaviate-2 Bound pvc-2b88f11e-fc9c-49c1-8719-473fdc673879 50Gi RWO standard <unset> 4m5s
weaviate-pvc-0 Bound weaviate-pv-0 50Gi RWO <unset> 5m48s
weaviate-pvc-1 Bound weaviate-pv-1 50Gi RWO <unset> 5m48s
weaviate-pvc-2 Bound weaviate-pv-2 50Gi RWO <unset> 5m48s
I think something is still wrong in my values.yaml, esp. about fullnameOverride, which I have low confidence I did the right thing.
if you have any information, please do share. Maybe if everything is figured out and great, I can help put together a quick blog if this helps others.