Kubernetes - Persistent StorageYou want to ensure data stored by your pod remains even if the pod is deleted and recreated. Which combination should you use?AUse a Volume with <code>emptyDir</code> in the pod spec.BUse a Persistent Volume with a Persistent Volume Claim referenced in the pod spec.CUse a hostPath volume pointing to a temporary directory.DUse a ConfigMap volume to store data files.Check Answer
Step-by-Step SolutionSolution:Step 1: Identify storage durability requirementData must persist beyond pod lifecycle, so temporary volumes like emptyDir or hostPath to temp dirs won't work.Step 2: Choose correct storage typePersistent Volumes with PVCs provide durable storage independent of pods, ensuring data remains after pod deletion.Final Answer:Use a Persistent Volume with a Persistent Volume Claim referenced in the pod spec. -> Option BQuick Check:Persistent Volume + PVC = durable storage [OK]Quick Trick: For durable data, always use Persistent Volume with PVC [OK]Common Mistakes:Using emptyDir for persistent dataUsing hostPath to temporary directoriesConfusing ConfigMap with storage for data
Master "Persistent Storage" in Kubernetes9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Kubernetes Quizzes ConfigMaps - Creating ConfigMaps from literals - Quiz 15hard Health Checks and Probes - Why probes keep applications healthy - Quiz 13medium Health Checks and Probes - TCP probe configuration - Quiz 4medium Health Checks and Probes - Liveness probe concept - Quiz 4medium Networking - Pod-to-Pod communication - Quiz 14medium Persistent Storage - Reclaim policies (Retain, Delete) - Quiz 12easy Persistent Storage - PersistentVolume (PV) definition - Quiz 11easy Scheduling - DaemonSets for per-node workloads - Quiz 12easy Secrets - Secrets are not encrypted by default - Quiz 4medium Secrets - Base64 encoding in Secrets - Quiz 3easy