Redis
 sql >> Database >  >> NoSQL >> Redis

Storage Kubernetes NFS tramite PV e PVC

1 - devi installare il tuo server NFS:segui le istruzioni in questo link:

https://vitux.com/install-nfs-server-and-client-on-ubuntu/

2- Crea la tua cartella condivisa dove vuoi mantenere i tuoi dati<

mount 192.168.56.2:/mnt/sharedfolder /mnt/shared/folder_client

3- Modificare in PV.yaml le seguenti istruzioni:

apiVersion: v1

    kind: PersistentVolume
    metadata:
      name: redis-pv
      labels:
        type: nfs
    spec:
      capacity:
        storage: 100Mi
      volumeMode: Filesystem
      accessModes:
        - ReadWriteOnce
      persistentVolumeReclaimPolicy: Retain
      storageClassName: slow
      mountOptions:
        - hard
        - nfsvers=4.1
      nfs:
        path: /mnt/sharedfolder
        server: 192.168.56.2 #ip of my master-node