Chapter 10 - PV & PVC
Opened this issue · 1 comments
These days, you usually don't need to create PersistentVolumes manually, as almost every cluster has dynamic provisioning enabled, and will create a PV automatically for every PVC you create. There is a sentence on page 291 that says:
If your cluster supports dynamic provisioning, you don’t
need to create any PersistentVolumes manually (you can skip the next section). If it
doesn’t, you’ll need to create them as explained in the next section.
Now, if you specifically want the statefulset pods to bind to the three PVs you created manually, you need to set statefulset.spec.volumeClaimTemplates.spec.storageClassName
to an empty string, as explained on page 189 in the "Forcing a PersistentVolumeClaim to be bound to one of the pre-provisioned PersistentVolumes" section.