I'm deploying postgres DB using helm by this steps:
apiVersion: v1
kind: PersistentVolume
metadata:
namespace: admin-4
name: postgresql-pv-admin-4
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/mnt/data"
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
namespace: admin-4
name: postgresql-pvc-admin-4
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
helm install postgres bitnami/postgresql --set persistence.enabled=true --set persistence.existingClaim=postgresql-pvc-admin-4 --set volumePermissions.enabled=true -n admin-4
On the latest bitnami/postgresql chart (chart version 11.8.1), the fields to set are:
primary:
persistence:
enabled: true
existingClaim: postgresql-pvc-admin-4