This message was deleted.
# k3s
a
This message was deleted.
i
Are you deploying manually or using Helm? You should be able to create a persistent volume claim with
storageClassName: local-path
if you’re deploying manually and then link your deployment to the PVC
b
Hi @important-art-22288 this is what I did and seems worked
Copy code
kind: PersistentVolume
apiVersion: v1
metadata:
  name: postgres-pv
  labels:
    app: postgres
    type: local
spec:
  storageClassName: local-path
  capacity:
    storage: 10Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/var/data"
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: postgres-pvc
  labels:
    app: postgres
spec:
  storageClassName: local-path
  capacity:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi
do you see any error here >
i
This looks correct, I believe you don’t need the persistent volume definition here, local-path will create the PVC from your PV
b
thanks @important-art-22288