Courseiva
mediumMultiple Choice

CV0-004 Practice Question: Deploying a stateful application that requires…

A company is deploying a stateful application that requires persistent storage. They are using Kubernetes. Which resource should they create to ensure data persists across pod restarts?

⚠ Common exam trap

It's easy for candidates to confuse a Deployment's ability to manage replicas with data persistence, overlooking that a Deployment alone does not guarantee storage survival across pod restarts without an explicit PVC.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

PersistentVolumeClaim

A PersistentVolumeClaim (PVC) is the correct resource because it abstracts the underlying storage details and allows a pod to request persistent storage that survives pod restarts. When a pod is recreated, the PVC ensures the same volume is reattached, preserving application state. This is essential for stateful applications in Kubernetes, as pods are ephemeral by default.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Deployment

    Why it's wrong here

    A Deployment manages stateless pod replicas and rolling updates; its pods are ephemeral, so any data written to container storage is lost on restart. It is tempting because Deployments are the default workload object, and it would be correct if the application stored no local state and could be recreated freely.

  • ✗

    Secret

    Why it's wrong here

    A Secret stores sensitive data such as passwords and tokens for injection into pods, not filesystem volumes; it is held in etcd and disappears from the pod's mount on restart. It would be correct for supplying credentials or TLS certificates to a container, but persistence requires a PersistentVolume bound by a PersistentVolumeClaim.

  • ✓

    PersistentVolumeClaim

    Why this is correct

    A PersistentVolumeClaim requests storage with specific capacity and access modes, binding to a PersistentVolume. Pods reference the claim, so the underlying volume and its data survive pod restarts, rescheduling and replacement, satisfying the persistence requirement.

  • ✗

    ConfigMap

    Why it's wrong here

    A ConfigMap holds non-confidential configuration as key-value pairs for environment variables or mounted files, and its contents are not a durable storage backend for application data. It suits decoupling configuration from images, whereas persistence across pod restarts requires a PersistentVolumeClaim bound to a PersistentVolume.

About these practice questions

This CV0-004 question is part of Courseiva's 834-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This CV0-004 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CV0-004 exam.