DCA · Question #67
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 B. No. Specifying a default provisioner and creating a PersistentVolumeClaim are not sufficient for dynamic provisioning; a default StorageClass must also be defined.
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 provisioner is specified, and subsequently a persistentVolumeClaim is created.
Options
- AYes
- BNo
How the community answered
(26 responses)- A27% (7)
- B73% (19)
Why each option
Specifying a default provisioner and creating a `PersistentVolumeClaim` are not sufficient for dynamic provisioning; a default `StorageClass` must also be defined.
Simply having a provisioner configured somewhere is not enough; the `PersistentVolumeClaim` needs to associate with a `StorageClass` (either explicitly or via a default) that uses that provisioner to initiate dynamic provisioning.
Dynamic provisioning in Kubernetes requires a `StorageClass` to be explicitly defined and marked as default using `storageclass.kubernetes.io/is-default-class: "true"`. A `PersistentVolumeClaim` then needs to either explicitly reference this `StorageClass` or omit the `storageClassName` field for the default `StorageClass` to be utilized to trigger provisioning.
Concept tested: Kubernetes dynamic PersistentVolume provisioning
Source: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#dynamic
Topics
Community Discussion
No community discussion yet for this question.