BookNest's catalog must not vanish because someone deleted a claim, so its data gets its own class with the Retain policy shown in Access Modes. It uses the same local-path provisioner; on EKS 24 only provisioner and parameters would change (Managed Kubernetes):
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata: { name: booknest-data, labels: { app: booknest } }
provisioner: rancher.io/local-path
reclaimPolicy: Retain
volumeBindingMode: WaitForFirstConsumerkubectl apply -f k8s/storage.yaml
kubectl get storageclass -o custom-columns=NAME:.metadata.name,PROVISIONER:.provisioner,\
RECLAIM:.reclaimPolicy,BINDING:.volumeBindingMode
git add k8s/storage.yaml && git commit -qm "Add a Retain StorageClass for BookNest's data"Output
storageclass.storage.k8s.io/booknest-data created NAME PROVISIONER RECLAIM BINDING booknest-data rancher.io/local-path Retain WaitForFirstConsumer standard rancher.io/local-path Delete WaitForFirstConsumer
allowVolumeExpansion is left out because local-path cannot grow a volume; cloud CSI classes allow it. The class is not the default, so scratch claims still get standard and clean up after themselves. Its volumes live only on l3-booknest-worker: local storage, not production storage. StatefulSets and PostgreSQL claims from it for PostgreSQL 1,289 .