✦ For everyone, free.

Practical knowledge for real and everyday life

Home

1.18 Kubernetes Storage Definition

Kubernetes Storage Definition refers to methods for managing and persisting data in Kubernetes clusters, ensuring reliable data access across containers and nodes.

Kubernetes Storage Definition is the precise characterization of the storage abstractions Kubernetes provides for attaching data to Pods, defined by a layered separation between ephemeral, Pod-scoped volumes and durable, independently provisioned storage represented by PersistentVolumes, allowing storage lifetime to be defined independently of any single Pod's lifetime when required.


Volumes Defined by Lifetime Scope

Bound to a Pod's Lifetime

A basic volume is defined by its lifetime being bound to the Pod that declares it: it comes into existence when the Pod is created and ceases to exist when the Pod is deleted, regardless of whether the data it held would otherwise be recoverable.

Shared Within, Not Across, a Pod

A volume's defined scope is the Pod, not the cluster; the same volume can be mounted into multiple containers within one Pod, enabling data sharing between them, but a volume declared in one Pod is not accessible from a different Pod, even one running on the same node.

volume lifetime = Pod lifetime

PersistentVolumes Defined by Independence from Pods

Existence Independent of Any Consumer

A PersistentVolume is defined specifically by its independence from any particular Pod: it is provisioned as a standalone cluster resource and continues to exist regardless of whether any Pod is currently using it, in direct contrast to the Pod-scoped lifetime of a basic volume.

Consumed Through a Claim, Not Directly

A Pod does not reference a PersistentVolume directly; it references a PersistentVolumeClaim, which is itself bound to a PersistentVolume, defining an intermediary layer that decouples the specific storage resource from the workload consuming it.


StorageClasses Defined as Provisioning Templates

A Category, Not an Instance

A StorageClass is defined as a template describing a category of storage and how to provision it, rather than as a specific storage instance itself; no data is stored directly against a StorageClass, only against the PersistentVolumes it is used to create.

Enabling On-Demand Creation

Because a StorageClass defines how storage of a given category should be provisioned, it enables PersistentVolumes to be created automatically and on demand in response to a PersistentVolumeClaim, rather than requiring one to already exist in advance.


Access Mode as a Defining Constraint

Governing Simultaneous Consumption

A PersistentVolume's access mode is defined as a constraint on how many nodes may mount it simultaneously and in what manner, ranging from exclusive single-node read-write access to shared multi-node read-write access, depending on what the underlying storage technology supports.


What Storage Definitions Exclude

Not a Guarantee of Backup or Replication

The Kubernetes storage definition governs how storage is attached and consumed, not whether the underlying data is backed up or replicated; those guarantees, if needed, are properties of the underlying storage system, not of the Kubernetes abstractions layered on top of it.


Storage Layer Diagram

Pod PVC PersistentVolume