Question 10
Domain 4: StorageWhich Kubernetes resource configuration is required to make an nginx pod use a PVC named my-pvc with the requested storage class, access mode, and mount path?
Correct answer: A
Explanation
A pod uses persistent storage through a PersistentVolumeClaim, and the claim must specify the requested capacity, storage class, and access mode. The answer matches those requirements by creating "a PersistentVolumeClaim named my-pvc with 10Gi, storageClassName k8s-csi-plugin, and access mode ReadWriteMany" and mounting it in "nginx-pod at /usr/share/html."
Why each option is right or wrong
A. Create a PersistentVolumeClaim named my-pvc with 10Gi, storageClassName k8s-csi-plugin, and access mode ReadWriteMany; then mount it in nginx-pod at /usr/share/html and patch the PVC size to 70Gi.
Under the Kubernetes PersistentVolumeClaim API, the claim must declare the requested storage in `spec.resources.requests.storage`, the binding class in `spec.storageClassName`, and the access mode in `spec.accessModes`; here that means `10Gi`, `k8s-csi-plugin`, and `ReadWriteMany` respectively. The pod then consumes that claim via a volume mount at `/usr/share/html`, and the later resize to `70Gi` is only valid if the underlying StorageClass and CSI driver support expansion, per the PVC expansion rules in Kubernetes storage documentation.
B. Create a PersistentVolume named my-pvc with 10Gi, storageClassName k8s-csi-plugin, and access mode ReadWriteOnce; then mount it in nginx-pod at /usr/share/html and patch the pod to 70Gi.
C. Create a PersistentVolumeClaim named nginx-pod with 10Gi, storageClassName standard, and access mode ReadOnlyMany; then mount it in my-pvc at /usr/share/html and resize the pod to 70Gi.
D. Create a ConfigMap named my-pvc with 10Gi and storageClassName k8s-csi-plugin; then mount it in nginx-pod at /usr/share/html and change the ConfigMap to 70Gi.