Study guide
5.4 Storage Access Modes, Reclaim Policies & Volume Expansion
Certified Kubernetes Administrator CKA
Track your progress as you read
Finished sections get a check mark.
1 Chapter 1: CKA Exam Environment & Cluster Architecture
1.1 CKA Exam Mechanics, Scoring & Remote Terminal Environment 1.2 Kubernetes Control Plane & Worker Node Components 1.3 etcd Architecture, Clustering & Raft Consensus 1.4 Initializing Clusters with Kubeadm 1.5 Highly Available (HA) Control Plane Topologies 1.6 Cluster Lifecycle & Step-by-Step Upgrades 1.7 etcd Snapshot Backup and Restore Procedures
2 Chapter 2: Cluster Extensions, Packaging & RBAC
2.1 Kubernetes TLS Certificates & PKI Infrastructure 2.2 Managing Kubeconfig Files, Users, & Contexts 2.3 Installing Cluster Components with Helm & Kustomize 2.4 Role-Based Access Control (RBAC): Roles & RoleBindings 2.5 ClusterRoles & ClusterRoleBindings 2.6 Custom Resource Definitions (CRDs) & Operators 2.7 Pod Security Standards (PSS) & Admission Controllers
3 Chapter 3: Workloads, Lifecycle & Pod Scheduling
3.1 Pod Lifecycle, Multi-Container Patterns & Init Containers 3.2 Deployments: Rolling Updates, Rollouts & Rollbacks 3.3 DaemonSets & StatefulSets Architecture 3.4 Batch Workloads: Jobs & CronJobs 3.5 Managing ConfigMaps & Sensitive Data with Secrets 3.6 Resource Requests, Limits & Namespace ResourceQuotas 3.7 NodeSelectors, Node Affinity & Anti-Affinity 3.8 Node Taints & Pod Tolerations 3.9 Autoscaling: Horizontal Pod Autoscaler (HPA) & Custom Metrics
4 Chapter 4: Services, Networking & Ingress Architecture
4.1 Kubernetes IP-per-Pod Model & CNI Plugins (Flannel, Calico, Cilium) 4.2 Services Deep Dive: ClusterIP, NodePort, LoadBalancer & EndpointSlices 4.3 Kube-Proxy Service Dataplane: iptables, nftables, IPVS & eBPF 4.4 CoreDNS Configuration, Resolution & Custom Forwarding 4.5 NetworkPolicies: Ingress, Egress & Default-Deny Isolation 4.6 Ingress Architecture, Controllers & Path-Based Routing 4.7 Gateway API: GatewayClass, Gateway, HTTPRoute & Traffic Splitting 4.8 External Traffic Ingress: NodePort, Cloud LoadBalancers & MetalLB
5 Chapter 5: Storage Architecture & Persistent Volumes
5.1 Ephemeral Volumes, EmptyDir, HostPath & Config Volumes 5.2 PersistentVolumes (PV) & PersistentVolumeClaims (PVC) Lifecycle 5.3 StorageClasses, Dynamic Provisioning & VolumeBindingModes 5.4 Storage Access Modes, Reclaim Policies & Volume Expansion 5.5 Container Storage Interface (CSI) Architecture & Drivers 5.6 StatefulSet VolumeClaimTemplates & Persistent Storage Workflows
6 Chapter 6: Advanced Troubleshooting, Monitoring & Maintenance
6.1 Systematic Kubernetes Troubleshooting Methodology 6.2 Node Failure, Kubelet Diagnostics & Systemd Services 6.3 Control Plane Failures, Static Pods & Component Logs 6.4 etcd Troubleshooting, Quorum Loss & Database Defragmentation 6.5 Pod Startup Failures, CrashLoopBackOff & OOMKilled Diagnostics 6.6 Workload Scheduling Failures & Resource Constraint Resolution 6.7 Container & Node Logging Architecture, Journalctl & Fluentd 6.8 Metrics Server, Resource Utilization & Kubectl Top 6.9 Service, Endpoint & Ingress Connectivity Troubleshooting 6.10 Storage Failures: PVC Pending, Mount Failures & Multi-Attach Errors 6.11 NetworkPolicy Isolation & CoreDNS Resolution Diagnostics
5.4 Storage Access Modes, Reclaim Policies & Volume Expansion
Key Takeaways Explain This Topic AI
Kubernetes supports four storage access modes: ReadWriteOnce (RWO), ReadOnlyMany (ROX), ReadWriteMany (RWX), and ReadWriteOncePod (RWOP).
ReadWriteOncePod (RWOP) restricts volume access to a single Pod across the entire cluster, eliminating split-brain data corruption risks during rolling updates on the same node.
Reclaim policies dictate physical storage behavior on PVC deletion: Retain preserves data and sets PV to Released; Delete destroys underlying cloud/SAN storage; Recycle is deprecated.
Reusing a Released PV under Retain policy requires manual administrative intervention: scrubbing physical data and removing spec.claimRef via JSON patch to return the PV to Available.
PVC capacity can only increase. StorageClass allowVolumeExpansion enables the request, while online filesystem growth depends on CSI driver and filesystem support; some volumes require a Pod restart to finish.
Last updated: August 2026
5.4 Storage Access Modes, Reclaim Policies & Volume Expansion
Configuring persistent storage for mission-critical enterprise workloads requires balancing data concurrency, lifecycle retention, and runtime capacity elasticity. Administrators must ensure that multi-pod access does not cause filesystem corruption, that accidental deletion of workload manifests does not destroy irrecoverable production databases, and that storage volumes can be expanded online as data volumes grow without requiring workload downtime.
This section examines Kubernetes Access Modes (including the modern ReadWriteOncePod mode), Reclaim Policies and the manual reclamation reuse procedure, and Dynamic Volume Expansion mechanics.
1. Storage Access Modes Deep Dive
When declaring a PersistentVolume or PersistentVolumeClaim , the accessModes field specifies how the volume can be mounted by cluster nodes. Crucially, a volume can only be mounted using one access mode at a time , even if the underlying storage hardware physically supports multiple modes. +-----------------------------------------------------------------------------------------+
- | KUBERNETES ACCESS MODES |
- | |
- | ReadWriteOnce (RWO) ReadOnlyMany (ROX) |
- | +-----------------------------+ +-----------------------------+ |
- | | Node 1: Pod A (Read-Write) | | Node 1: Pod A (Read-Only) | |
- | | Node 1: Pod B (Read-Write) | | Node 2: Pod B (Read-Only) | |
- | | (Single Node Only) | | (Multiple Nodes Read) | |
- | +-----------------------------+ +-----------------------------+ |
- | |
- | ReadWriteMany (RWX) ReadWriteOncePod (RWOP) |
- | +-----------------------------+ +-----------------------------+ |
- | | Node 1: Pod A (Read-Write) | | Node 1: Pod A (Read-Write) | |
- | | Node 2: Pod B (Read-Write) | | Node 1: Pod B (BLOCKED) | |
- | | (Multiple Nodes Write) | | (Single POD Cluster-Wide) | |
- | +-----------------------------+ +-----------------------------+ |
- +-----------------------------------------------------------------------------------------+
- Access Modes Breakdown & Backend Compatibility
Access Mode CLI Abbr Semantic Guarantee Common Storage Backends
ReadWriteOnce RWO Volume can be mounted as read-write by a single worker node . Multiple pods scheduled on that same node can read/write simultaneously. AWS EBS, GCP Persistent Disk, Azure Disk, Ceph RBD, Local PVs
ReadOnlyMany ROX Volume can be mounted as read-only by many nodes concurrently. NFS, AWS EFS, Google Filestore, CephFS
ReadWriteMany RWX Volume can be mounted as read-write by many nodes concurrently. NFS, AWS EFS, Azure Files, CephFS, GlusterFS
ReadWriteOncePod RWOP Volume can be mounted as read-write by exactly one Pod across the entire cluster. CSI Drivers supporting CSI v1.5+ (Kubernetes v1.29+ GA)
Why ReadWriteOncePod (RWOP) Is Essential for Stateful Safety
Under standard ReadWriteOnce (RWO), if a StatefulSet pod replica is updated via a rolling deployment and the scheduler places the replacement pod on the same worker node before the terminating pod fully exits, both pods will attach and write to the volume simultaneously. For single-writer database engines (such as MySQL, PostgreSQL, or embedded SQLite), this overlapping access frequently causes irreversible index corruption. ReadWriteOncePod enforces strict single-pod mutual exclusion cluster-wide.
2. Reclaim Policies & The Manual PV Reuse Workflow
When an application developer deletes a PersistentVolumeClaim , the bound PersistentVolume executes the reclamation behavior defined in spec.persistentVolumeReclaimPolicy : persistentVolumeReclaimPolicy: Retain # Valid Options: Retain, Delete, Recycle
Reclaim Policies Compared:
Retain (Manual Reclamation):
The PVC is deleted -> The PV transitions to the Released status.
The underlying physical data on the SAN/Cloud volume remains 100% intact .
No new PVC can bind to the PV because spec.claimRef still points to the deleted claim's UID.
Delete (Automatic Destruction):
The PVC deletion leads Kubernetes to remove the PV and ask the provisioner to delete the backing asset.
Storage deletion is asynchronous and provider-dependent; verify completion before assuming the data is gone.
Recycle (Deprecated):
Executes a basic filesystem wipe ( rm -rf /volume/* ) and returns the PV to Available .
Step-by-Step: Reclaiming and Reusing a Released PV
In CKA troubleshooting scenarios, administrators must recover data from a Released PV and make it available for a new application claim without losing underlying storage: # Step 1: Inspect the Released PV
- kubectl get pv enterprise-nfs-pv
- # NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM
- # enterprise-nfs-pv 50Gi RWO Retain Released prod/old-claim
- # Step 2: Export a backup copy of the PV manifest
- kubectl get pv enterprise-nfs-pv -o yaml > pv-backup.yaml
# Step 3: Secure any required backup and scrub or validate retained data for the intended new claimant
# Perform the storage-system-specific sanitization before exposing the PV.
- # Step 4: Remove the claimRef locking the old claim
- kubectl patch pv enterprise-nfs-pv --type=json -p='[{"op": "remove", "path": "/spec/claimRef"}]'
- # Step 5: Verify the PV status transitions from 'Released' to 'Available'
- kubectl get pv enterprise-nfs-pv
- # NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM
- # enterprise-nfs-pv 50Gi RWO Retain Available
# Step 6: Restrict the next claim deliberately with storageClassName, selector, or claimRef as appropriate.
3. Dynamic Volume Expansion (Online Resizing)
Kubernetes can expand a PVC, but completion behavior depends on the CSI driver, volume mode, and filesystem. Many supported filesystems grow online while in use; other combinations require the consuming Pod to restart. +-----------------------------------------------------------------------------------------+
- | VOLUME EXPANSION LIFECYCLE |
- | |
- | 1. Developer edits PVC: spec.resources.requests.storage: 50Gi -> 100Gi |
- | | |
- | v |
- | 2. CSI Resizer sidecar intercepts event and calls ControllerExpandVolume |
- | | |
- | v |
- | 3. Cloud Storage API expands physical block device to 100Gi |
- | | |
- | v |
- | 4. Kubelet/CSI performs supported online resize, or reports a pending node-side resize |
- | | |
- | v |
- | 5. Verify PVC capacity and conditions; restart the Pod only when offline resize is required |
- +-----------------------------------------------------------------------------------------+
- Step 1: Verify StorageClass Enables Expansion
Dynamic volume expansion requires that the backing StorageClass explicitly enables the feature: apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
- name: expandable-sc
- provisioner: ebs.csi.aws.com
- allowVolumeExpansion: true # MANDATORY: Must be set to true
- Step 2: Expand the PersistentVolumeClaim
Apply an imperative JSON patch to increase the requested storage capacity: # Patch the PVC storage request from 50Gi to 100Gi
kubectl patch pvc database-storage-pvc -n default --type=merge -p '{"spec":{"resources":{"requests":{"storage":"100Gi"}}}}'
Expansion Constraints & FileSystemResizePending Condition
Strictly One-Way: Volume expansion can only increase storage capacity. Attempting to decrease volume size (e.g., from 100Gi down to 50Gi) is immediately rejected by the API server with a validation error because the new requested capacity is below the existing value.
FileSystemResizePending : If the physical block device is expanded by the cloud provider but the Pod is currently offline, the PVC status condition will report FileSystemResizePending . Starting the Pod triggers kubelet to run resize2fs (for ext4 ) or xfs_growfs (for xfs ) online, completing the expansion.