PersistentVolumeClaim
apiVersion: v1
import "k8s.io/api/core/v1"
PersistentVolumeClaim
PersistentVolumeClaim is a user’s request for and claim to a persistent volume
-
apiVersion: v1
-
kind: PersistentVolumeClaim
-
metadata (ObjectMeta)
Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata -
spec (PersistentVolumeClaimSpec)
Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims -
status (PersistentVolumeClaimStatus)
Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
PersistentVolumeClaimSpec
PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes
- accessModes ([]string)
AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - selector (LabelSelector)
A label query over volumes to consider for binding. - resources (ResourceRequirements)
Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
ResourceRequirements describes the compute resource requirements.- resources.limits (map[string]Quantity)
Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - resources.requests (map[string]Quantity)
Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
- resources.limits (map[string]Quantity)
- volumeName (string)
VolumeName is the binding reference to the PersistentVolume backing this claim. - storageClassName (string)
Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - volumeMode (string)
volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.
Alpha level
- dataSource (TypedLocalObjectReference)
This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - Beta) * An existing PVC (PersistentVolumeClaim) * An existing custom resource/object that implements data population (Alpha) In order to use VolumeSnapshot object types, the appropriate feature gate must be enabled (VolumeSnapshotDataSource or AnyVolumeDataSource) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the specified data source is not supported, the volume will not be created and the failure will be reported as an event. In the future, we plan to support more data source types and the behavior of the provisioner may change.
PersistentVolumeClaimStatus
PersistentVolumeClaimStatus is the current status of a persistent volume claim.
- accessModes ([]string)
AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - capacity (map[string]Quantity)
Represents the actual resources of the underlying volume. - conditions ([]PersistentVolumeClaimCondition)
Patch strategy: merge on keytype
Current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to ‘ResizeStarted’.
PersistentVolumeClaimCondition contails details about state of pvc-
conditions.status (string), required
-
conditions.type (string), required
-
conditions.lastProbeTime (Time)
Last time we probed the condition.
Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers. -
conditions.lastTransitionTime (Time)
Last time the condition transitioned from one status to another.
Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers. -
conditions.message (string)
Human-readable message indicating details about last transition. -
conditions.reason (string)
Unique, this should be a short, machine understandable string that gives the reason for condition’s last transition. If it reports “ResizeStarted” that means the underlying persistent volume is being resized.
-
- phase (string)
Phase represents the current phase of PersistentVolumeClaim.
PersistentVolumeClaimList
PersistentVolumeClaimList is a list of PersistentVolumeClaim items.
-
apiVersion: v1
-
kind: PersistentVolumeClaimList
-
metadata (ListMeta)
Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds -
items ([]PersistentVolumeClaim), required
A list of persistent volume claims. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
Operations
get
read the specified PersistentVolumeClaim
HTTP Request
GET /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}
Parameters
- {name} (string), required
name of the PersistentVolumeClaim - {namespace} (string), required
namespace - ?pretty (string)
pretty
Response
200 (PersistentVolumeClaim): OK
401: Unauthorized
get
read status of the specified PersistentVolumeClaim
HTTP Request
GET /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status
Parameters
- {name} (string), required
name of the PersistentVolumeClaim - {namespace} (string), required
namespace - ?pretty (string)
pretty
Response
200 (PersistentVolumeClaim): OK
401: Unauthorized
list
list or watch objects of kind PersistentVolumeClaim
HTTP Request
GET /api/v1/namespaces/{namespace}/persistentvolumeclaims
Parameters
- {namespace} (string), required
namespace - ?allowWatchBookmarks (boolean)
allowWatchBookmarks - ?continue (string)
continue - ?fieldSelector (string)
fieldSelector - ?labelSelector (string)
labelSelector - ?limit (integer)
limit - ?pretty (string)
pretty - ?resourceVersion (string)
resourceVersion - ?resourceVersionMatch (string)
resourceVersionMatch - ?timeoutSeconds (integer)
timeoutSeconds - ?watch (boolean)
watch
Response
200 (PersistentVolumeClaimList): OK
401: Unauthorized
list
list or watch objects of kind PersistentVolumeClaim
HTTP Request
GET /api/v1/persistentvolumeclaims
Parameters
- ?allowWatchBookmarks (boolean)
allowWatchBookmarks - ?continue (string)
continue - ?fieldSelector (string)
fieldSelector - ?labelSelector (string)
labelSelector - ?limit (integer)
limit - ?pretty (string)
pretty - ?resourceVersion (string)
resourceVersion - ?resourceVersionMatch (string)
resourceVersionMatch - ?timeoutSeconds (integer)
timeoutSeconds - ?watch (boolean)
watch
Response
200 (PersistentVolumeClaimList): OK
401: Unauthorized
create
create a PersistentVolumeClaim
HTTP Request
POST /api/v1/namespaces/{namespace}/persistentvolumeclaims
Parameters
-
{namespace} (string), required
namespace -
body (PersistentVolumeClaim), required
-
?dryRun (string)
dryRun -
?fieldManager (string)
fieldManager -
?pretty (string)
pretty
Response
200 (PersistentVolumeClaim): OK
201 (PersistentVolumeClaim): Created
202 (PersistentVolumeClaim): Accepted
401: Unauthorized
update
replace the specified PersistentVolumeClaim
HTTP Request
PUT /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}
Parameters
-
{name} (string), required
name of the PersistentVolumeClaim -
{namespace} (string), required
namespace -
body (PersistentVolumeClaim), required
-
?dryRun (string)
dryRun -
?fieldManager (string)
fieldManager -
?pretty (string)
pretty
Response
200 (PersistentVolumeClaim): OK
201 (PersistentVolumeClaim): Created
401: Unauthorized
update
replace status of the specified PersistentVolumeClaim
HTTP Request
PUT /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status
Parameters
-
{name} (string), required
name of the PersistentVolumeClaim -
{namespace} (string), required
namespace -
body (PersistentVolumeClaim), required
-
?dryRun (string)
dryRun -
?fieldManager (string)
fieldManager -
?pretty (string)
pretty
Response
200 (PersistentVolumeClaim): OK
201 (PersistentVolumeClaim): Created
401: Unauthorized
patch
partially update the specified PersistentVolumeClaim
HTTP Request
PATCH /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}
Parameters
-
{name} (string), required
name of the PersistentVolumeClaim -
{namespace} (string), required
namespace -
body (Patch), required
-
?dryRun (string)
dryRun -
?fieldManager (string)
fieldManager -
?force (boolean)
force -
?pretty (string)
pretty
Response
200 (PersistentVolumeClaim): OK
401: Unauthorized
patch
partially update status of the specified PersistentVolumeClaim
HTTP Request
PATCH /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status
Parameters
-
{name} (string), required
name of the PersistentVolumeClaim -
{namespace} (string), required
namespace -
body (Patch), required
-
?dryRun (string)
dryRun -
?fieldManager (string)
fieldManager -
?force (boolean)
force -
?pretty (string)
pretty
Response
200 (PersistentVolumeClaim): OK
401: Unauthorized
delete
delete a PersistentVolumeClaim
HTTP Request
DELETE /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}
Parameters
-
{name} (string), required
name of the PersistentVolumeClaim -
{namespace} (string), required
namespace -
body (DeleteOptions)
-
?dryRun (string)
dryRun -
?gracePeriodSeconds (integer)
gracePeriodSeconds -
?pretty (string)
pretty -
?propagationPolicy (string)
propagationPolicy
Response
200 (PersistentVolumeClaim): OK
202 (PersistentVolumeClaim): Accepted
401: Unauthorized
deletecollection
delete collection of PersistentVolumeClaim
HTTP Request
DELETE /api/v1/namespaces/{namespace}/persistentvolumeclaims
Parameters
-
{namespace} (string), required
namespace -
body (DeleteOptions)
-
?continue (string)
continue -
?dryRun (string)
dryRun -
?fieldSelector (string)
fieldSelector -
?gracePeriodSeconds (integer)
gracePeriodSeconds -
?labelSelector (string)
labelSelector -
?limit (integer)
limit -
?pretty (string)
pretty -
?propagationPolicy (string)
propagationPolicy -
?resourceVersion (string)
resourceVersion -
?resourceVersionMatch (string)
resourceVersionMatch -
?timeoutSeconds (integer)
timeoutSeconds
Response
200 (Status): OK
401: Unauthorized