โ† All KCNA Flashcard Decks

Storage & Persistent Volumes Flashcards

7 cards from real KCNA practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 7 Storage & Persistent Volumes flashcards as text
  1. What is the primary advantage of using the Container Storage Interface (CSI) over in-tree volume plugins?

    Answer: CSI allows storage vendors to develop drivers independently without modifying Kubernetes core

    CSI decouples storage driver development from Kubernetes releases, allowing vendors to ship updates independently without waiting for Kubernetes core changes.

  2. A PersistentVolume has a capacity of 10Gi. A PVC requests 8Gi. The PV and PVC are bound. How much storage can the PVC actually use?

    Answer: Up to 10Gi, since the entire PV is bound to the PVC

    When a PV is bound to a PVC, the entire PV is dedicated to that claim; the Pod can use up to the PV's full capacity (10Gi), not just the requested 8Gi.

  3. Which component is responsible for registering a CSI driver with the kubelet on each node?

    Answer: node-driver-registrar

    The node-driver-registrar sidecar registers the CSI driver with kubelet using the kubelet plugin registration mechanism.

  4. What is a VolumeSnapshotClass used for in Kubernetes?

    Answer: Specifying the CSI driver and parameters for creating VolumeSnapshots

    VolumeSnapshotClass defines which CSI driver handles snapshot creation and provides driver-specific parameters, analogous to how StorageClass works for volumes.

  5. How does Kubernetes handle storage for a Pod in a StatefulSet when the Pod is rescheduled to a different node?

    Answer: The same PVC is reattached to the new node and mounted to the rescheduled Pod

    StatefulSet PVCs are retained across Pod rescheduling; when a Pod moves to a new node, Kubernetes detaches and reattaches the same PVC to preserve data.

  6. Which annotation on a StorageClass sets it as the cluster-wide default for PVCs that omit storageClassName?

    Answer: storageclass.kubernetes.io/is-default-class: 'true'

    The annotation storageclass.kubernetes.io/is-default-class: 'true' marks a StorageClass as the default, automatically used by PVCs that don't specify a class.

  7. What is the effect of setting 'persistentVolumeReclaimPolicy: Recycle' on a PersistentVolume?

    Answer: Basic scrubbing (rm -rf) is performed and the volume is made available again

    The Recycle policy performs a basic scrub (rm -rf /thevolume/*) and makes the PV available again for a new claim, though this policy is deprecated in favor of dynamic provisioning.