Home > front end >  Helm Postgres will not bind to PVC
Helm Postgres will not bind to PVC

Time:08-31

I'm deploying postgres DB using helm by this steps:

  1. applying pv:
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"
  1. applying PVC:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  namespace: admin-4
  name: postgresql-pvc-admin-4
spec:
  storageClassName: manual
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi
  1. running helm command:
helm install postgres bitnami/postgresql --set persistence.enabled=true --set persistence.existingClaim=postgresql-pvc-admin-4 --set volumePermissions.enabled=true -n admin-4

This is the output: k get pod,pv,pvc

CodePudding user response:

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
  • Related