nerdexam
Linux_Foundation

CKAD · Question #15

A project that you are working on has a requirement for persistent data to be available. To facilitate this, perform the following tasks: Create a file on node sk8s-node-0 at…

This question tests your ability to configure Kubernetes persistent storage end-to-end, from creating a host file to wiring a PersistentVolume (PV) through a PersistentVolumeClaim (PVC) into a running pod.

Submitted by manish99· May 4, 2026Application Deployment

Question

A project that you are working on has a requirement for persistent data to be available. To facilitate this, perform the following tasks:
  • Create a file on node sk8s-node-0 at /opt/KDSP00101/data/index.html with the content Acct=Finance
  • Create a PersistentVolume named task-pv-volume using hostPath and allocate 1GI to it, specifying that the volume is at /opt/KDSP00101/data on the cluster's node. The configuration should specify the access mode of ReadWriteOnce. It should define the StorageClass name exam for the PersistentVolume, which will be used to bind PersistentVolumeClaim requests to this PersistentVolume.
  • Create a PersistentVolumeClaim named task-pv-claim that requests a volume of at least 100Mi and specifies an access mode of ReadWriteOnce
  • Create a pod that uses the PersistentVolumeClaim as a volume with a label app: my-storage-app mounting the resulting volume to a mountPath /usr/share/nginx/html inside the pod

Explanation

This question tests your ability to configure Kubernetes persistent storage end-to-end, from creating a host file to wiring a PersistentVolume (PV) through a PersistentVolumeClaim (PVC) into a running pod.

Approach. The correct approach follows Kubernetes' storage binding chain in order: (1) SSH into sk8s-node-0 and create /opt/KDSP00101/data/index.html with 'Acct=Finance' using echo or tee. (2) Create a PersistentVolume YAML with hostPath pointing to that directory, capacity of 1Gi, accessModes: [ReadWriteOnce], and storageClassName: exam. (3) Create a PersistentVolumeClaim YAML referencing storageClassName: exam, requesting at least 100Mi with accessModes: [ReadWriteOnce] - Kubernetes will bind it to task-pv-volume because the storageClass and access mode match. (4) Create a Pod spec (e.g., using nginx) with metadata label app: my-storage-app, a volumes entry referencing the PVC by name, and a volumeMounts entry mounting it at /usr/share/nginx/html. The PV capacity must be >= PVC request, the storageClassName must match exactly, and the accessMode must be compatible for binding to succeed.

Concept tested. Kubernetes end-to-end persistent storage lifecycle: hostPath PersistentVolume provisioning, PVC binding via StorageClass name and access mode matching, and mounting a PVC into a pod via volumeMounts - a core CKA skill covering storage objects and their relationships.

Reference. https://kubernetes.io/docs/tasks/configure-pod-container/configure-persistent-volume-storage/

Topics

#Persistent Volumes#Persistent Volume Claims#Pod Storage#Data Persistence

Community Discussion

No community discussion yet for this question.

Full CKAD Practice