Question 39
Domain 4: StorageWhich set of Kubernetes resources and behavior correctly demonstrates dynamic volume provisioning with a StorageClass?
Correct answer: A
Explanation
A StorageClass defines how storage is provisioned, so using the SSD provisioner lets Kubernetes create storage on demand. When a 20Gi PersistentVolumeClaim is created, dynamic provisioning automatically creates a matching PersistentVolume and binds it to the claim for use by a Pod.
Why each option is right or wrong
A. Create a StorageClass using the SSD provisioner, then create a 20Gi PVC that triggers automatic PV creation and binds it to a Pod.
Under the Kubernetes PersistentVolume/PersistentVolumeClaim model, a StorageClass is the object that enables dynamic provisioning by naming the provisioner and its parameters; when a PVC requests storage and specifies that class, the control plane asks the provisioner to create a matching PV automatically. In this scenario, a 20Gi PVC is the triggering object, and the resulting PV is then bound to the claim and made available to the Pod once the claim is satisfied, which is the expected behavior for dynamic provisioning rather than pre-creating a static PV.
B. Create a PersistentVolume first with 20Gi capacity, then create a Pod; the PVC will automatically be generated and bound.
C. Create a Pod with an emptyDir volume and a StorageClass; Kubernetes will dynamically provision a PV without any PVC.
D. Create a StatefulSet with a hostPath volume; Kubernetes will use the StorageClass to attach an existing PV to the Pod.