Your application requires persistent storage across pod restarts. Which volume type should you use?

  1. PersistentVolume ✓
  2. ConfigMap
  3. emptyDir
  4. hostPath

Correct answer: PersistentVolume

Option A is correct because a PersistentVolume (combined with a PersistentVolumeClaim) provides storage that exists independently of any individual pod's lifecycle, meaning data survives pod restarts, rescheduling, or deletion. Option B is wrong because a ConfigMap stores configuration data such as key-value pairs or files and is not designed for application data persistence. Option C is wrong because an emptyDir volume is created fresh when a pod is assigned to a node and is deleted permanently when the pod is removed, making it ephemeral by design. Option D is wrong because hostPath mounts a directory from the node's filesystem directly into the pod, which ties storage to a specific node and is unsuitable for production workloads that may be rescheduled across nodes.

Topic: · persistent volumes, kubernetes storage, pvc, pod lifecycle

Practice Certified Kubernetes Administrator (CKA) Questions Free