Managing storage is a distinct problem from managing compute resources.
OpenShift Container Platform leverages the Kubernetes persistent volume (PV) framework to allow
cluster administrators to provision persistent storage for a cluster. Using persistent
volume claims (PVCs), developers can request PV resources without having
specific knowledge of the underlying storage infrastructure.
PVCs are specific to a
and are created and used by developers as a means to use a PV. PV resources on
their own are not scoped to any single project; they can be shared across the
entire OpenShift Container Platform cluster and claimed from any project. After a PV is
bound to a PVC, however, that PV cannot then be bound to
additional PVCs. This has the effect of scoping a bound PV to a single
(that of the binding project).
PVs are defined by a
PersistentVolume API object, which represents a piece of
existing, networked storage in the cluster that was provisioned by the
cluster administrator. It is a resource in the cluster just like a node is a
cluster resource. PVs are volume plug-ins like
Volumes but have a lifecycle
that is independent of any individual
pod that uses the PV. PV
objects capture the details of the implementation of the storage, be that NFS,
iSCSI, or a cloud-provider-specific storage system.
High availability of storage in the infrastructure is left to the underlying
PVCs are defined by a
PersistentVolumeClaim API object, which represents a
request for storage by a developer. It is similar to a pod in that pods consume
node resources and PVCs consume PV resources. For example, pods can request
specific levels of resources (e.g., CPU and memory), while PVCs can request
specific storage capacity and access
modes (e.g, they can be mounted once read/write or many times read-only).