Interview's MateKubernetes
Interview's Mate

Kubernetes

K8s · Workloads · GitOps · Cloud

Visualizer

DSA Visualizer
All 32 lessons
Custom Playground
Try your own examples

Learning

System Design
31 architecture topics
SQL Learning
160 foundations → production topics
AI Engineering
160 LLM → backend topics
Data Science
160 Python → MLOps topics
Data Engineer
160 SQL → streaming topics
Docker
160 Docker learning topics
Kubernetes
160 K8s fundamentals → cloud
Java LearnSoon
Coming soon
Python Learn
Interview Q&A & internals
JavaScript Learn
Closures, async & DOM Q&A
Tech Learn
Search, practise & track Q&A
AI DSA Practice
Solve coding problems
Theme
Home
Kubernetes topics
Lesson 68/ 160
04. Storage & Persistent Data

Cloud Block & File Storage (AWS EBS/EFS, GCP Persistent Disk, Azure Disk)

Map cloud block and file offerings to StorageClasses and access modes.

IntermediateEBS/EFS · PD · Azure Disk3 quiz questions
Practice DevOps Q&A
In plain wordsDiagramTheoryStep by stepWhen to use itInterview cluesMistakes to avoidQuiz (3)Practice

In plain words

Cloud block storage is a hard disk bolted to one neighborhood appliance, while cloud file storage is a shared office drive reachable from many rooms. The simple Kubernetes rule is: Cloud block volumes such as EBS, Persistent Disk, and Azure Disk are zonal and usually RWO-style, while managed file systems such as EFS or Azure Files provide networked shared file mounts.

Think of it like…

Cloud block storage is a hard disk bolted to one neighborhood appliance, while cloud file storage is a shared office drive reachable from many rooms.

Where you’ve seen it

Before approving a data-path change, the storage owner runs kubectl get storageclass; kubectl get pvc -o custom-columns='NAME:.metadata.name,STORAGECLASS:.spec.storageClassName,ACCESS:.spec.accessModes'. Expected evidence: Cloud block volumes such as EBS, Persistent Disk, and Azure Disk are zonal and usually RWO-style, while managed file systems such as EFS or Azure Files provide networked shared file mounts. If the run instead shows this symptom, stop and restore the last known state: Moving a Pod across zones without topology awareness, or attaching a burst-limited disk to a read-heavy database, produces scheduling and latency failures.

Words you’ll hear

EBS/EFS
For this lesson, EBS/EFS is the controlling idea: Cloud block volumes such as EBS, Persistent Disk, and Azure Disk are zonal and usually RWO-style, while managed file systems such as EFS or Azure Files provide networked shared file mounts.
PD
PD is the checkpoint; run kubectl get storageclass; kubectl get pvc -o custom-columns='NAME:.metadata.name,STORAGECLASS:.spec.storageClassName,ACCESS:.spec.accessModes' and inspect the owner chain. Moving a Pod across zones without topology awareness, or attaching a burst-limited disk to a read-heavy database, produces scheduling and latency failures.
Azure Disk
Azure Disk is the outcome to preserve; the cost is explicit: Block storage favors low-latency exclusive ownership; file storage favors shared access at network overhead and different consistency or throughput limits.
Verification evidence
The evidence command is kubectl get storageclass; kubectl get pvc -o custom-columns='NAME:.metadata.name,STORAGECLASS:.spec.storageClassName,ACCESS:.spec.accessModes'. It connects the declaration to this behavior: Map cloud block and file offerings to StorageClasses and access modes.

Visual diagram

Loading interactive diagram

Theory & deep dive

How EBS/EFS reaches the intended state

Map cloud block and file offerings to StorageClasses and access modes. Cloud block volumes such as EBS, Persistent Disk, and Azure Disk are zonal and usually RWO-style, while managed file systems such as EFS or Azure Files provide networked shared file mounts.

The concrete checkpoint is kubectl get storageclass; kubectl get pvc -o custom-columns='NAME:.metadata.name,STORAGECLASS:.spec.storageClassName,ACCESS:.spec.accessModes'; compare the EBS/EFS owner, PD state, and Azure Disk outcome instead of treating YAML acceptance as proof.

Verify PD, not only object creation

Run kubectl get storageclass; kubectl get pvc -o custom-columns='NAME:.metadata.name,STORAGECLASS:.spec.storageClassName,ACCESS:.spec.accessModes' after the change and correlate the result with Events and the owning object. Cloud block volumes such as EBS, Persistent Disk, and Azure Disk are zonal and usually RWO-style, while managed file systems such as EFS or Azure Files provide networked shared file mounts.

Key takeaway: EBS/EFS is implemented only when this invariant remains observable: Cloud block volumes such as EBS, Persistent Disk, and Azure Disk are zonal and usually RWO-style, while managed file systems such as EFS or Azure Files provide networked shared file mounts.

PD: failure boundary and production cost

Moving a Pod across zones without topology awareness, or attaching a burst-limited disk to a read-heavy database, produces scheduling and latency failures. The prerequisite contract is concrete: Cloud block volumes such as EBS, Persistent Disk, and Azure Disk are zonal and usually RWO-style, while managed file systems such as EFS or Azure Files provide networked shared file mounts.

Block storage favors low-latency exclusive ownership; file storage favors shared access at network overhead and different consistency or throughput limits. A safe design limits blast radius, records the last good configuration, and uses kubectl get storageclass; kubectl get pvc -o custom-columns='NAME:.metadata.name,STORAGECLASS:.spec.storageClassName,ACCESS:.spec.accessModes' as a deterministic rollback checkpoint.

Recover from PD drift

Capture the current state with kubectl get storageclass; kubectl get pvc -o custom-columns='NAME:.metadata.name,STORAGECLASS:.spec.storageClassName,ACCESS:.spec.accessModes', then correct the controlling manifest rather than patching a child object; the relevant divergence signal is specific: Moving a Pod across zones without topology awareness, or attaching a burst-limited disk to a read-heavy database, produces scheduling and latency failures.

Key takeaway: Accept the trade-off consciously: Block storage favors low-latency exclusive ownership; file storage favors shared access at network overhead and different consistency or throughput limits.

How it works, step by step

Step 1 of 4
Data owner

1. Declare the data contract

State capacity, topology, access, and ownership in the claim or class: Cloud block volumes such as EBS, Persistent Disk, and Azure Disk are zonal and usually RWO-style, while managed file systems such as EFS or Azure Files provide networked shared file mounts.

EBS/EFS contract → owned state
Key numbers at this step
Goal
Map cloud block and file offerings to StorageClasses and access modes.
Owner
EBS/EFS

When to use it & trade-offs

What it is

Map cloud block and file offerings to StorageClasses and access modes. Cloud block volumes such as EBS, Persistent Disk, and Azure Disk are zonal and usually RWO-style, while managed file systems such as EFS or Azure Files provide networked shared file mounts.

Why it matters: Moving a Pod across zones without topology awareness, or attaching a burst-limited disk to a read-heavy database, produces scheduling and latency failures. The invariant at risk is specific: Cloud block volumes such as EBS, Persistent Disk, and Azure Disk are zonal and usually RWO-style, while managed file systems such as EFS or Azure Files provide networked shared file mounts. The quickest fact check before changing the design is kubectl get storageclass; kubectl get pvc -o custom-columns='NAME:.metadata.name,STORAGECLASS:.spec.storageClassName,ACCESS:.spec.accessModes'.

When to reach for it

  • Use EBS/EFS to enforce this invariant: Cloud block volumes such as EBS, Persistent Disk, and Azure Disk are zonal and usually RWO-style, while managed file systems such as EFS or Azure Files provide networked shared file mounts.
  • Use PD evidence from kubectl get storageclass; kubectl get pvc -o custom-columns='NAME:.metadata.name,STORAGECLASS:.spec.storageClassName,ACCESS:.spec.accessModes' in reviews and incident timelines. Map cloud block and file offerings to StorageClasses and access modes.
  • Choose the managed external data plane route only when this cost is justified by governance or scale: Block storage favors low-latency exclusive ownership; file storage favors shared access at network overhead and different consistency or throughput limits.

When to avoid or be careful

  • Avoid assuming EBS/EFS is complete after YAML submission; the required behavior is concrete: Cloud block volumes such as EBS, Persistent Disk, and Azure Disk are zonal and usually RWO-style, while managed file systems such as EFS or Azure Files provide networked shared file mounts.
  • Avoid treating the next symptom as random; check the owner and state with kubectl get storageclass; kubectl get pvc -o custom-columns='NAME:.metadata.name,STORAGECLASS:.spec.storageClassName,ACCESS:.spec.accessModes' first: Moving a Pod across zones without topology awareness, or attaching a burst-limited disk to a read-heavy database, produces scheduling and latency failures.
  • Avoid adopting a heavier platform wrapper before measuring its cost: Block storage favors low-latency exclusive ownership; file storage favors shared access at network overhead and different consistency or throughput limits.

Native, manual, and managed paths for EBS/EFS

Dynamically provisioned storage
Best for: Map cloud block and file offerings to StorageClasses and access modes. A concrete incident check is kubectl get storageclass; kubectl get pvc -o custom-columns='NAME:.metadata.name,STORAGECLASS:.spec.storageClassName,ACCESS:.spec.accessModes'.

Strengths: Cloud block volumes such as EBS, Persistent Disk, and Azure Disk are zonal and usually RWO-style, while managed file systems such as EFS or Azure Files provide networked shared file mounts.

Watch out: Block storage favors low-latency exclusive ownership; file storage favors shared access at network overhead and different consistency or throughput limits. Recovery must also recognize this signal: Moving a Pod across zones without topology awareness, or attaching a burst-limited disk to a read-heavy database, produces scheduling and latency failures.

Manual pre-provisioning
Best for: Quickly testing the PD assumption with kubectl get storageclass; kubectl get pvc -o custom-columns='NAME:.metadata.name,STORAGECLASS:.spec.storageClassName,ACCESS:.spec.accessModes'; the expected invariant is: Cloud block volumes such as EBS, Persistent Disk, and Azure Disk are zonal and usually RWO-style, while managed file systems such as EFS or Azure Files provide networked shared file mounts.

Strengths: kubectl get storageclass; kubectl get pvc -o custom-columns='NAME:.metadata.name,STORAGECLASS:.spec.storageClassName,ACCESS:.spec.accessModes' gives immediate feedback without first building a platform layer.

Watch out: A manual change can hide drift, and unlike EBS/EFS, it does not make this symptom self-documenting: Moving a Pod across zones without topology awareness, or attaching a burst-limited disk to a read-heavy database, produces scheduling and latency failures.

Managed external data plane
Best for: Teams that need Azure Disk integrated with guardrails; the evidence path is kubectl get storageclass; kubectl get pvc -o custom-columns='NAME:.metadata.name,STORAGECLASS:.spec.storageClassName,ACCESS:.spec.accessModes'.

Strengths: Platform controls can wrap this exact behavior in policy or dashboards: Cloud block volumes such as EBS, Persistent Disk, and Azure Disk are zonal and usually RWO-style, while managed file systems such as EFS or Azure Files provide networked shared file mounts.

Watch out: The added platform ownership buys value at this cost: Block storage favors low-latency exclusive ownership; file storage favors shared access at network overhead and different consistency or throughput limits.

Interview signals & numbers to know

When this topic comes up

  • Interview anchor: Cloud block volumes such as EBS, Persistent Disk, and Azure Disk are zonal and usually RWO-style, while managed file systems such as EFS or Azure Files provide networked shared file mounts.
  • Trace EBS/EFS to Azure Disk through PD; the invariant is: Cloud block volumes such as EBS, Persistent Disk, and Azure Disk are zonal and usually RWO-style, while managed file systems such as EFS or Azure Files provide networked shared file mounts.
  • Recognize the symptom: Moving a Pod across zones without topology awareness, or attaching a burst-limited disk to a read-heavy database, produces scheduling and latency failures.
  • Justify the cost: Block storage favors low-latency exclusive ownership; file storage favors shared access at network overhead and different consistency or throughput limits.
  • Verify with kubectl get storageclass; kubectl get pvc -o custom-columns='NAME:.metadata.name,STORAGECLASS:.spec.storageClassName,ACCESS:.spec.accessModes' instead of only inspecting YAML.

Benchmarks & rules of thumb

1 -
availability zone usually constrains a cloud block disk
3 -
cloud block families in this lesson: EBS, PD, and Azure Disk
0 -
RWX permission automatically makes block storage shareable

Common mistakes & follow-ups

Common interview mistakes

  • Debugging only the child object misses the EBS/EFS owner contract: Cloud block volumes such as EBS, Persistent Disk, and Azure Disk are zonal and usually RWO-style, while managed file systems such as EFS or Azure Files provide networked shared file mounts.
  • Ignoring this telltale condition leads to unrelated changes: Moving a Pod across zones without topology awareness, or attaching a burst-limited disk to a read-heavy database, produces scheduling and latency failures.
  • Repeating kubectl get storageclass; kubectl get pvc -o custom-columns='NAME:.metadata.name,STORAGECLASS:.spec.storageClassName,ACCESS:.spec.accessModes' without an owner for remediation wastes retry cost. Block storage favors low-latency exclusive ownership; file storage favors shared access at network overhead and different consistency or throughput limits.

Likely interviewer follow-ups

  • How would API output and runtime evidence prove this behavior: Cloud block volumes such as EBS, Persistent Disk, and Azure Disk are zonal and usually RWO-style, while managed file systems such as EFS or Azure Files provide networked shared file mounts?
  • Which owner object, logs, and Events would you inspect for this symptom-Moving a Pod across zones without topology awareness, or attaching a burst-limited disk to a read-heavy database, produces scheduling and latency failures-?
  • At what threshold would this cost become unacceptable: Block storage favors low-latency exclusive ownership; file storage favors shared access at network overhead and different consistency or throughput limits?
Interview tip: Interview sequence: state the invariant, run kubectl get storageclass; kubectl get pvc -o custom-columns='NAME:.metadata.name,STORAGECLASS:.spec.storageClassName,ACCESS:.spec.accessModes', name the failure, then justify the cost. Invariant: Cloud block volumes such as EBS, Persistent Disk, and Azure Disk are zonal and usually RWO-style, while managed file systems such as EFS or Azure Files provide networked shared file mounts. Failure: Moving a Pod across zones without topology awareness, or attaching a burst-limited disk to a read-heavy database, produces scheduling and latency failures. Cost: Block storage favors low-latency exclusive ownership; file storage favors shared access at network overhead and different consistency or throughput limits.

Knowledge check

Loading quiz

Put it into practice

Practice related interview Q&A

Apply Cloud Block & File Storage (AWS EBS/EFS, GCP Persistent Disk, Azure Disk) with generative AI interview Q&A and hands-on practice.

Open DevOps Q&A →Tech Learn Q&A
Previous topic
Container Storage Interface (CSI) Architecture & Drivers
Next topic
Distributed & Self-Hosted Storage (Rook-Ceph, Longhorn, OpenEBS)