DCA · Question #68
Are these conditions sufficient for Kubernetes to dynamically provision a persistentVolume, assuming there are no limitations on the amount and type of available external storage? Solution: A default
The correct answer is A. Yes. If a default StorageClass is configured and a PersistentVolumeClaim is created, Kubernetes will dynamically provision a PersistentVolume.
Question
Are these conditions sufficient for Kubernetes to dynamically provision a persistentVolume, assuming there are no limitations on the amount and type of available external storage? Solution: A default storageClass is specified, and subsequently a persistentVolumeClaim is created.
Options
- AYes
- BNo
How the community answered
(41 responses)- A88% (36)
- B12% (5)
Why each option
If a default `StorageClass` is configured and a `PersistentVolumeClaim` is created, Kubernetes will dynamically provision a `PersistentVolume`.
When a `StorageClass` is explicitly marked as default and a `PersistentVolumeClaim` is subsequently created without specifying a `storageClassName`, Kubernetes automatically uses this default `StorageClass`. The default `StorageClass` then triggers its associated provisioner to dynamically create and bind a `PersistentVolume` matching the `PVC`'s requirements.
These conditions are precisely what Kubernetes requires for dynamic provisioning when a `PersistentVolumeClaim` does not explicitly name a `StorageClass`.
Concept tested: Kubernetes dynamic PV with default StorageClass
Source: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#default-storage-class
Topics
Community Discussion
No community discussion yet for this question.