CompTIA Cloud+ guideStudy & preparation
CompTIA Cloud+ Container Storage: What Survives a Restart?
Short answer
The storage location and the event determine which data survives. Kubernetes documents that emptyDir data survives a container crash within the same pod but is deleted when the pod is removed from its node; a PersistentVolume has a lifecycle independent of any one pod. Data must actually be written to the selected volume, and persistence alone does not guarantee protection against deletion or storage failure.
Which lifecycle does the data follow?
A container crash does not automatically mean its pod's temporary volume is lost. Kubernetes documents that emptyDir data survives container crashes but is deleted when the pod is removed from its node; persistent volumes have a lifecycle independent of any one pod.
Start a storage question by identifying where the data was written and what changed. “The workload restarted” is too vague: the scenario might mean a container was recreated inside the same pod, the pod was replaced, or the underlying storage failed. Those are different events.
CompTIA's CV0-004 objectives, document version 5.0, checked November 11, 2026, include persistent volumes and ephemeral storage in objective 1.6. The Kubernetes examples below explain that distinction; they are not predictions of an exam task. For the wider context, see the Cloud+ domain and format overview. Cloud Architecture practice is planned for full CompTIA Cloud+ prep.
| Data location | Container recreated within the same pod | Pod removed from its node and replaced | What the storage label does not establish |
|---|---|---|---|
| Files written inside the container, outside the selected volume | The recreated container does not retain those ephemeral files | Do not expect the replacement to retain the old container's files | A volume elsewhere does not protect files written outside it |
emptyDir volume used by that pod | Data survives a container crash while the same pod remains | The old pod's emptyDir data is deleted | Survival of the pod does not establish protection against an independent storage failure |
| Data written to a PersistentVolume | Its lifecycle is independent of that one pod | Pod replacement alone does not define the volume's lifetime | Retention, access by the replacement and protection against other failures still need evidence |
The persistent-volume and ephemeral-volume source notes were checked November 11, 2026. The more specific container-crash and emptyDir behavior was checked in Kubernetes' volume documentation on November 14, 2026.
Before choosing an answer, underline the event and circle the storage location in the question.
What survives a container crash inside the same pod?
An emptyDir is created when a pod is assigned to a node, and containers in that pod can share it. Its lifetime is longer than an individual container's crash-and-recreation cycle, but it remains tied to the pod.
That makes two apparently similar statements different:
- “The worker wrote its checkpoint inside its own container.” If that container is recreated, the ephemeral files are not retained.
- “The worker wrote its checkpoint into the pod's
emptyDir.” A container crash alone does not delete those files while the same pod remains.
The word checkpoint does not make storage persistent. It describes the file's purpose. Its actual location determines which lifecycle applies.
For a study answer, write the full condition: “The checkpoint survives this container crash because it was written to emptyDir and the same pod remains.” If the question does not establish those conditions, identify the missing information instead of assuming them. In multiple-choice practice, the explanation planned for each question in CompTIA Cloud+ prep can show which condition decided it.
What changes when the pod is removed or replaced?
Removing the pod from its node ends its emptyDir lifetime. A replacement pod is not evidence that the old temporary files survived. If the requirement is to preserve data beyond that pod, choose storage whose lifecycle is independent of it.
A PersistentVolume provides that lifecycle separation. It does not establish that every file a container writes is on the volume, or that a replacement automatically has access to the required data.
Use this short check:
- Locate the write. Was the file actually written to the selected persistent storage?
- Identify the event. Was only the container recreated, or was the pod removed?
- Check retention and access. Does the scenario establish that the relevant volume remains and that the replacement can use it?
- Keep other failures separate. Do not infer protection against deletion or storage failure from the word “persistent.”
This is a reasoning checklist, not a Kubernetes configuration procedure. If the scenario omits retention or access details, say what must be verified before claiming the data is available.
How do persistent volumes differ from a backup?
Persistence answers a lifecycle question: is the data's lifetime independent of one pod? It does not, by itself, prove that a separate recoverable copy exists, that data is replicated, or that the storage is always available.
For example, a fictional requirement might say: “The export manifest must remain available after its processing pod is replaced.” Persistent storage addresses that lifecycle requirement, provided the manifest is written there and retained. A different requirement—“We must recover an earlier copy after the stored manifest is deleted”—needs separate recovery evidence. The first requirement does not settle the second.
Keep those requirements on separate lines in your notes. Use the Cloud+ recovery objectives and backup-chain guide when the question shifts to recovery targets or backup selection.
Which storage choice fits these three requirements?
Work these original fictional cases on paper before reading the reasoning. They are instructional examples, not official or recalled exam questions. For each, write the required lifetime, your storage choice and one condition that would change the answer.
| Case | Requirement | Reasoned choice and limit |
|---|---|---|
| Shared conversion workspace | Two containers in the same pod exchange disposable intermediate files. Nothing must survive removal of the pod. | A shared emptyDir fits the stated temporary lifetime. Both containers must use that volume for the exchanged files. It is unsuitable if those files later become required after pod removal. |
| Interrupted conversion worker | The worker crashes after writing a checkpoint to emptyDir. The same pod remains, and the exercise specifies no separate storage failure. | The checkpoint survives the container crash. Replacing the pod would change the answer because the old emptyDir would be deleted when that pod is removed from its node. |
| Retained export manifest | A replacement pod must read a previously written business manifest. The exercise specifies that the persistent volume is retained and made available to the replacement. | Write the manifest to that persistent volume. The requirement extends beyond one pod; writing inside the old container or to its emptyDir would not meet it. This says nothing about recovery from a separate storage failure. |
Now change just one fact in the second case: the checkpoint was written inside the container instead of to emptyDir. Explain why the original conclusion no longer follows. This tests whether you tracked the write location rather than memorized “checkpoints survive.” Storage questions you miss in practice can return through Fix It in the CompTIA Cloud+ prep planned for launch.
What should you verify in a disposable practice lab?
The paper exercise is enough to rehearse the decision. If you also use an isolated, disposable learning environment, record the expected result before following that environment's instructions for each lifecycle event. Use dummy files only.
Your observation sheet should contain the file's actual location, the container and pod involved, the event performed, and whether the file remains readable afterward. For persistent storage, include the evidence that the volume was retained and made available; do not treat a successful read as proof of backup or universal failure protection.
Use the Cloud+ PBQ lab-practice guide to organize a focused exercise. Then try the 20 free Cloud+ practice questions and schedule another review with the free Cloud+ study plan.
For every storage answer, finish with a precise sentence: “These files survive this event because they were written here, under these conditions.”
Trust the source
Official sources
Exam policies can change. Use these primary sources for the most current details.