Persistent local storage

Good day,

I’ve been trying for hours to get this right but to no avail, so any help would be greatly appreciated.

I’m trying to set up a postgresql chart (from the Catalog Apps) with persistent local storage for test environments. My issue is I cannot get it to persist the volume locally to a chosen directory.

On the cluster I created a persistent volume:

  • Volume Plugin = Local Node Path
  • Capacity = 20GiB
  • path on the Node = /opt/postgresql (I created this directory on the rancheros file system)
  • The Path on the Node must be = A directory, or create if it does not exist
  • Access Modes = Single Node Read-Write
  • Mount Options = none
  • Assign to Storage Class = none
  • Node Affinity = No node Selectors

On the project I created a persistent volume claim bound to the persistent volume:

  • Access Modes = Single Node Read-Write

On the postgres chart I’m using:

  • persistence.existingClaim = MY_PVC
  • using a username and password. Tried various combinations of the persistence options to no avail.

Ultimately I cannot get the mount point contents /var/lib/postgresql/data/pgdata to persist on the nodes local filesystem

1 Like