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
-
spec (
Spec defines the desired characteristics of a volume requested by a pod author. More info:
-
status (
Status represents the current information/status of a persistent volume claim. Read-only. More info:
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:
-
selector (
A label query over volumes to consider for binding.
-
resources (ResourceRequirements)
Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info:
ResourceRequirements describes the compute resource requirements.
-
resources.limits (map[string]
Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
-
resources.requests (map[string]
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-resources-containers/
-
-
volumeName (string)
VolumeName is the binding reference to the PersistentVolume backing this claim.
-
storageClassName (string)
-
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
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:
-
capacity (map[string]
Represents the actual resources of the underlying volume.
-
conditions ([]PersistentVolumeClaimCondition)
Patch strategy: merge on key
type
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
Possible enum values:
"FileSystemResizePending"
- controller resize is finished and a file system resize is pending on node"Resizing"
- a user trigger resize of pvc has been started
-
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.
Possible enum values:
"Bound"
used for PersistentVolumeClaims that are bound"Lost"
used for PersistentVolumeClaims that lost their underlying PersistentVolume. The claim was bound to a PersistentVolume and this volume does not exist any longer and all data on it was lost."Pending"
used for PersistentVolumeClaims that are not yet bound
-
resizeStatus (string)
ResizeStatus stores status of resize operation. ResizeStatus is not set by default but when expansion is complete resizeStatus is set to empty string by resize controller or kubelet. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.
PersistentVolumeClaimList
PersistentVolumeClaimList is a list of PersistentVolumeClaim items.
Operations
get
read the specified PersistentVolumeClaim
HTTP Request
GET /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}
Parameters
-
name (in path): string, required
name of the PersistentVolumeClaim
-
namespace (in path): string, required
-
pretty (in query): string
Response
200 (
401: Unauthorized GET /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status name (in path): string, required name of the PersistentVolumeClaim namespace (in path): string, required pretty (in query): string 200 (
401: Unauthorized GET /api/v1/namespaces/{namespace}/persistentvolumeclaims namespace (in path): string, required allowWatchBookmarks (in query): boolean continue (in query): string fieldSelector (in query): string labelSelector (in query): string limit (in query): integer pretty (in query): string resourceVersion (in query): string resourceVersionMatch (in query): string timeoutSeconds (in query): integer watch (in query): boolean 200 (
401: Unauthorized GET /api/v1/persistentvolumeclaims allowWatchBookmarks (in query): boolean continue (in query): string fieldSelector (in query): string labelSelector (in query): string limit (in query): integer pretty (in query): string resourceVersion (in query): string resourceVersionMatch (in query): string timeoutSeconds (in query): integer watch (in query): boolean 200 (
401: Unauthorized POST /api/v1/namespaces/{namespace}/persistentvolumeclaims namespace (in path): string, required dryRun (in query): string fieldManager (in query): string fieldValidation (in query): string pretty (in query): string 200 (
201 (
202 (
401: Unauthorized PUT /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name} name (in path): string, required name of the PersistentVolumeClaim namespace (in path): string, required dryRun (in query): string fieldManager (in query): string fieldValidation (in query): string pretty (in query): string 200 (
201 (
401: Unauthorized PUT /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status name (in path): string, required name of the PersistentVolumeClaim namespace (in path): string, required dryRun (in query): string fieldManager (in query): string fieldValidation (in query): string pretty (in query): string 200 (
201 (
401: Unauthorized PATCH /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name} name (in path): string, required name of the PersistentVolumeClaim namespace (in path): string, required dryRun (in query): string fieldManager (in query): string fieldValidation (in query): string force (in query): boolean pretty (in query): string 200 (
201 (
401: Unauthorized PATCH /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status name (in path): string, required name of the PersistentVolumeClaim namespace (in path): string, required dryRun (in query): string fieldManager (in query): string fieldValidation (in query): string force (in query): boolean pretty (in query): string 200 (
201 (
401: Unauthorized DELETE /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name} name (in path): string, required name of the PersistentVolumeClaim namespace (in path): string, required dryRun (in query): string gracePeriodSeconds (in query): integer pretty (in query): string propagationPolicy (in query): string 200 (
202 (
401: Unauthorized DELETE /api/v1/namespaces/{namespace}/persistentvolumeclaims namespace (in path): string, required continue (in query): string dryRun (in query): string fieldSelector (in query): string gracePeriodSeconds (in query): integer labelSelector (in query): string limit (in query): integer pretty (in query): string propagationPolicy (in query): string resourceVersion (in query): string resourceVersionMatch (in query): string timeoutSeconds (in query): integer 200 (
401: Unauthorizedget
read status of the specified PersistentVolumeClaimHTTP Request
Parameters
Response
list
list or watch objects of kind PersistentVolumeClaimHTTP Request
Parameters
Response
list
list or watch objects of kind PersistentVolumeClaimHTTP Request
Parameters
Response
create
create a PersistentVolumeClaimHTTP Request
Parameters
Response
update
replace the specified PersistentVolumeClaimHTTP Request
Parameters
Response
update
replace status of the specified PersistentVolumeClaimHTTP Request
Parameters
Response
patch
partially update the specified PersistentVolumeClaimHTTP Request
Parameters
Response
patch
partially update status of the specified PersistentVolumeClaimHTTP Request
Parameters
Response
delete
delete a PersistentVolumeClaimHTTP Request
Parameters
Response
deletecollection
delete collection of PersistentVolumeClaimHTTP Request
Parameters
Response