Interview › Kubernetes, Docker, Helm & Podman
What is the difference between a volume, a PersistentVolume, and an emptyDir?
Kubernetes, Docker, Helm & Podman · Basic level
Answer
A volume is any storage source mounted into a Pod. A PersistentVolume is durable cluster storage claimed through a PVC. emptyDir is temporary storage created with the Pod and deleted when the Pod is removed from the node.
Technical explanation
emptyDir is useful for cache, scratch, and handoff between containers in a Pod, but it is not a backup or durable data store.
A normal Pod volume can be config, secret, projected, CSI, emptyDir, hostPath, or a PVC-backed mount.
Kubernetes workload controllers encode different lifecycle guarantees: interchangeable replicas, stable identities, node-local agents, or finite tasks.
Storage decisions must align with durability, access mode, zone placement, backup, restore, and failover behavior.
Autoscaling should be designed with metrics, scheduling constraints, PDBs, and node capacity together.
Hands-on example
1. Deploy a workload for this exercise using kubectl apply and a small test image such as nginx, busybox, or a purpose-built app: compare emptyDir and PVC-backed storage across Pod restarts.
2. Inspect ownerReferences, events, Pods, PVCs, PVs, EndpointSlices, and metrics depending on the resource being tested.
3. Create a realistic disruption: delete a Pod, scale replicas, restart a node, fill a queue, or recreate storage attachment in a test environment.
4. Write the runbook entry covering expected behavior, safe rollback, and what alarms should exist.
Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.
More Kubernetes, Docker, Helm & Podman interview questions
- How does Kubernetes DNS work for service discovery?
- What is the difference between the HPA, VPA, and Cluster Autoscaler?
- What is the difference between a StatefulSet and a Deployment?
- What is a ResourceQuota and a LimitRange?
- How do you encrypt Kubernetes Secrets at rest?
- What is the difference between a liveness, readiness, and startup probe?
- How does a Service select its Pods, and what happens if labels do not match?
- How do you roll back a Deployment, and how does Kubernetes track revisions?