Kubernetes Certified Network Administrator (KCNA) Part 2 Practice Test

Access More Questions
In Kubernetes, how do you request and attach persistent storage to a Pod?
Correct Answer:
By defining a PersistentVolumeClaim in the Pod specification
Explanation:
In Kubernetes, to request and attach persistent storage to a Pod you use a PersistentVolumeClaim and connect it to the Pod through a volume. The claim specifies how much storage you need and with what access mode, and Kubernetes will bind it to an existing PersistentVolume or dynamically provision one if a StorageClass is configured. In the Pod spec you then declare a volume that uses that claim (persistentVolumeClaim: claimName: your-pvc) and mount it into the container via a volumeMounts entry. This approach decouples the Pod from the storage lifecycle and enables portability and dynamic provisioning. ConfigMaps are for configuration data, not storage. A StorageClass defines how storage is provisioned but isn’t directly attached to a Pod; it’s used by the PVC to provision PVs. Mounting a hostPath attaches a directory from the node’s filesystem, which isn’t portable or durable across nodes.

Access more questions from this quiz

Continue to Kubernetes Certified Network Administrator (KCNA) Part 2 Practice Test for more practice questions and the full quiz experience.

Access More Questions