From 80d57ba7d8a9fa663c97684953bd620be69847df Mon Sep 17 00:00:00 2001 From: markturansky Date: Tue, 30 Jun 2015 17:43:47 -0400 Subject: [PATCH 1/4] 1st draft of PV/PVC doc --- docs/persistent-volumes.md | 169 +++++++++++++++++++++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 docs/persistent-volumes.md diff --git a/docs/persistent-volumes.md b/docs/persistent-volumes.md new file mode 100644 index 00000000000..8d40885080a --- /dev/null +++ b/docs/persistent-volumes.md @@ -0,0 +1,169 @@ +# Persistent Volumes and Claims + +This document describes the current state of Persistent Volumes in kubernetes. Familiarity with [volumes](./volumes.md) is suggested. + +A Persistent Volume (PV) is a piece of storage infrastructure in the cluster that has been provisioned by an administrator. It is a resource available in the cluster just like a node is a cluster resource. PVs are volume plugins like Volumes, but have a lifecycle independent of any individual pod that uses the PV. + +A Persistent Volume Claim (PVC) is a request for storage by a user. It is similar to a pod. Pods consume node resources and PVCs consume PV resources. Pods can request specific levels of resources (CPU and Memory). Claims can request specific size and access modes (e.g, can be mounted once read/write or many times read-only). + +Please see the [detailed walkthrough with working examples](https://github.com/GoogleCloudPlatform/kubernetes/tree/master/examples/persistent-volumes). + + +## Lifecycle of a volume and claim + +PVs are resources in the cluster. PVC are requests for those resources and also act as claim checks to the resource. The interaction between PVs and PVCs follows this lifecycle: + +### Provisioning + +The volume is created by an administrator. It becomes a cluster resource available for consumption. + +### Claiming + +A persistent volume claim is created by a user requesting a specific amount of storage and with certain access modes. There is a process watching for new claims and it binds them to an available volume, if a match is available. It is possible for claims to go unmatched. For example, if an admin provisions the cluster with many 50Gi volumes but the user asks for 100Gi, a match will be unavailable. The user will always get at least what they asked for, but the volume may be in excess of what was requested. + +### Using + +Pods use their claim as a volume. The cluster uses the claim to find the volume bound to it and mounts that volume for the user. For those volumes that support multiple access modes, the user specifies which mode desired when using their claim as a volume in a pod. + +### Releasing + +When a user is done with their volume, they can delete their claim which allows reclamation of the resource. The volume is considered "released" when the claim is deleted, but it is not yet available for another claim. The previous claimant's data remains on the volume and must be handled according to policy. + +### Reclaiming + +A persistent volume's reclaim policy tells the cluster what to do with the volume after its released from its claim. Currently, volumes can be retained on release or recycled. Retention allows for manual reclamation of the resource. For those volume plugins that support it, recycling performs a basic scrub ("rm -rf /thevolume/*") on the volume and makes it available again for a new claim. + + +## Types of Persistent Volumes + +Persistent volumes are implemented as plugins. Kubernetes currently supports the following plugins: + +* GCEPersistentDisk +* AWSElasticBlockStore +* NFS +* ISCSI +* RBD +* Glusterfs +* HostPath (single node testing only) + + +## Persistent Volumes + +Each PV contains a spec and status, which is the specification and status of the volume. + +``` + + apiVersion: v1 + kind: PersistentVolume + metadata: + name: pv0003 + spec: + capacity: + storage: 5Gi + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Recycle + nfs: + path: /tmp + server: 172.17.0.2 + status: + phase: Bound + +``` + +### Capacity + +Generally, a PV will have a specific storage capacity. This is set using the PV's ```capacity``` attribute. See the Kubernetes [Resource Model](./resources.md) to understand the units expected by ```capacity```. + +Currently, storage size is the only resource that can be set or requested. Future attributes may include IOPS, throughput, etc. + +### Access Modes + +Persistent Volumes can be mounted on a host in any way supported by the resource provider. Providers will have different capabilities and each PV's access modes are set to the specific modes supported by that particular volume. For example, NFS can support multiple read/write clients, but a specific NFS PV might be exported on the server as read-only. + +The access modes are: + +* ReadWriteOnce -- the volume can be mounted as read-write by a single node +* ReadOnlyMany -- the volume can be mounted read-only by many nodes +* ReadWriteMany -- the volume can be mounted as read-write by many nodes + +In the CLI, the access modes are abbreviated to: + +* RWO - ReadWriteOnce +* ROX - ReadOnlyMany +* RWX - ReadWriteMany + +> __Important!__ A volume can only be mounted using one access mode at a time, even if it supports many. For example, a GCEPersistentDisk can be mounted as ReadWriteOnce by a single node or ReadOnlyMany by many nodes, but not at the same time. . + + +### Recycling Policy + +Current recycling policies are: + +* Retain -- manual reclamation +* Recycle -- basic scrub + +Currently, NFS and HostPath support recycling. + +### Phase + +A volume will be in one of the following phases: + +* Available -- a free resource resource that is not yet bound to a claim +* Bound -- the volume is bound to a claim +* Released -- the claim has been deleted, but the resource is not yet reclaimed by the cluster +* Failed -- the volume has failed its automatic reclamation + +The CLI will show the name of the PVC bound to the PV. + +## Persistent Volume Claims + +Each PVC contains a spec and status, which is the specification and status of the claim. + +``` + +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: myclaim +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 8Gi + +``` +### Access Modes + +Claims use the same conventions as volumes when requesting storage with specific access modes. + +### Resources + +Claims, like pods, can request specific quantities of a resource. In this case, the request is for storage. The same [resource model](./resources.md) applies to both volumes and claims. + +## Claims As Volumes + +Pods access storage by using the claim as a volume. Claims must exist in the same namespace as the pod using the claim. The cluster finds the claim in the pod's namespace and uses it to get the persistent volume backing the claim. The volume is then mounted to the host and into the pod. + +``` + +kind: Pod +apiVersion: v1 +metadata: + name: mypod +spec: + containers: + - name: myfrontend + image: dockerfile/nginx + volumeMounts: + - mountPath: "/var/www/html" + name: mypd + volumes: + - name: mypd + persistentVolumeClaim: + claimName: myclaim + +``` + +[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/persistent-volumes.md?pixel)]() From 7fb3aaf348d147698f160cec5a8cfb94f5080818 Mon Sep 17 00:00:00 2001 From: markturansky Date: Wed, 1 Jul 2015 11:25:23 -0400 Subject: [PATCH 2/4] addressed feedback and various other edits --- docs/persistent-volumes.md | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/docs/persistent-volumes.md b/docs/persistent-volumes.md index 8d40885080a..4bab357ce38 100644 --- a/docs/persistent-volumes.md +++ b/docs/persistent-volumes.md @@ -1,8 +1,8 @@ # Persistent Volumes and Claims -This document describes the current state of Persistent Volumes in kubernetes. Familiarity with [volumes](./volumes.md) is suggested. +This document describes the current state of Persistent Volumes in Kubernetes. Familiarity with [volumes](./volumes.md) is suggested. -A Persistent Volume (PV) is a piece of storage infrastructure in the cluster that has been provisioned by an administrator. It is a resource available in the cluster just like a node is a cluster resource. PVs are volume plugins like Volumes, but have a lifecycle independent of any individual pod that uses the PV. +A Persistent Volume (PV) is a piece of networked storage in the cluster that has been provisioned by an administrator. It is a resource in the cluster just like a node is a cluster resource. PVs are volume plugins like Volumes, but have a lifecycle independent of any individual pod that uses the PV. A Persistent Volume Claim (PVC) is a request for storage by a user. It is similar to a pod. Pods consume node resources and PVCs consume PV resources. Pods can request specific levels of resources (CPU and Memory). Claims can request specific size and access modes (e.g, can be mounted once read/write or many times read-only). @@ -17,22 +17,23 @@ PVs are resources in the cluster. PVC are requests for those resources and also The volume is created by an administrator. It becomes a cluster resource available for consumption. -### Claiming +### Binding -A persistent volume claim is created by a user requesting a specific amount of storage and with certain access modes. There is a process watching for new claims and it binds them to an available volume, if a match is available. It is possible for claims to go unmatched. For example, if an admin provisions the cluster with many 50Gi volumes but the user asks for 100Gi, a match will be unavailable. The user will always get at least what they asked for, but the volume may be in excess of what was requested. +A persistent volume claim is created by a user requesting a specific amount of storage and with certain access modes. There is a process watching for new claims that binds them to an available volume if a match is available. The user will always get at least what they asked for, but the volume may be in excess of what was requested. + +Claims will remain unbound indefinitely if a matching volume does not exist. Claims will be bound as matching volumes become available. For example, a cluster provisioned with many 50Gi volumes would not match a PVC requesting 100Gi. The PVC can be bound when a 100Gi PV is added to the cluster. ### Using -Pods use their claim as a volume. The cluster uses the claim to find the volume bound to it and mounts that volume for the user. For those volumes that support multiple access modes, the user specifies which mode desired when using their claim as a volume in a pod. +Pods use their claim as a volume. The cluster uses the claim to find the bound volume bound and mounts that volume for the user. For those volumes that support multiple access modes, the user specifies which mode desired when using their claim as a volume in a pod. ### Releasing -When a user is done with their volume, they can delete their claim which allows reclamation of the resource. The volume is considered "released" when the claim is deleted, but it is not yet available for another claim. The previous claimant's data remains on the volume and must be handled according to policy. +When a user is done with their volume, they can delete their claim which allows reclamation of the resource. The volume is considered "released" when the claim is deleted, but it is not yet available for another claim. The previous claimant's data remains on the volume which must be handled according to policy. ### Reclaiming -A persistent volume's reclaim policy tells the cluster what to do with the volume after its released from its claim. Currently, volumes can be retained on release or recycled. Retention allows for manual reclamation of the resource. For those volume plugins that support it, recycling performs a basic scrub ("rm -rf /thevolume/*") on the volume and makes it available again for a new claim. - +A persistent volume's reclaim policy tells the cluster what to do with the volume after it's released. Currently, volumes can either be Retained or Recycled. Retention allows for manual reclamation of the resource. For those volume plugins that support it, recycling performs a basic scrub ("rm -rf /thevolume/*") on the volume and makes it available again for a new claim. ## Types of Persistent Volumes @@ -79,7 +80,7 @@ Currently, storage size is the only resource that can be set or requested. Futu ### Access Modes -Persistent Volumes can be mounted on a host in any way supported by the resource provider. Providers will have different capabilities and each PV's access modes are set to the specific modes supported by that particular volume. For example, NFS can support multiple read/write clients, but a specific NFS PV might be exported on the server as read-only. +Persistent Volumes can be mounted on a host in any way supported by the resource provider. Providers will have different capabilities and each PV's access modes are set to the specific modes supported by that particular volume. For example, NFS can support multiple read/write clients, but a specific NFS PV might be exported on the server as read-only. Each PV gets its own set of access modes describing that specific PV's capabilities. The access modes are: @@ -93,7 +94,7 @@ In the CLI, the access modes are abbreviated to: * ROX - ReadOnlyMany * RWX - ReadWriteMany -> __Important!__ A volume can only be mounted using one access mode at a time, even if it supports many. For example, a GCEPersistentDisk can be mounted as ReadWriteOnce by a single node or ReadOnlyMany by many nodes, but not at the same time. . +> __Important!__ A volume can only be mounted using one access mode at a time, even if it supports many. For example, a GCEPersistentDisk can be mounted as ReadWriteOnce by a single node or ReadOnlyMany by many nodes, but not at the same time. ### Recycling Policy @@ -101,7 +102,7 @@ In the CLI, the access modes are abbreviated to: Current recycling policies are: * Retain -- manual reclamation -* Recycle -- basic scrub +* Recycle -- basic scrub ("rm -rf /thevolume/*") Currently, NFS and HostPath support recycling. From 32e8e7d3e64068c4434ae3c3a09331c4f3bd2a0d Mon Sep 17 00:00:00 2001 From: markturansky Date: Wed, 1 Jul 2015 16:42:42 -0400 Subject: [PATCH 3/4] edits from feedback --- docs/persistent-volumes.md | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/docs/persistent-volumes.md b/docs/persistent-volumes.md index 4bab357ce38..501ff77d9e5 100644 --- a/docs/persistent-volumes.md +++ b/docs/persistent-volumes.md @@ -1,10 +1,12 @@ # Persistent Volumes and Claims -This document describes the current state of Persistent Volumes in Kubernetes. Familiarity with [volumes](./volumes.md) is suggested. +This document describes the current state of ```PersistentVolumes``` in Kubernetes. Familiarity with [volumes](./volumes.md) is suggested. -A Persistent Volume (PV) is a piece of networked storage in the cluster that has been provisioned by an administrator. It is a resource in the cluster just like a node is a cluster resource. PVs are volume plugins like Volumes, but have a lifecycle independent of any individual pod that uses the PV. +Managing storage is a distinct problem from managing compute. The ```PersistentVolume``` subsystem provides an API for users and administrators that abstracts details of how storage is provided from how it is consumed. To do this we introduce two new API resources: ```PersistentVolume``` and ```PersistentVolumeClaim```. -A Persistent Volume Claim (PVC) is a request for storage by a user. It is similar to a pod. Pods consume node resources and PVCs consume PV resources. Pods can request specific levels of resources (CPU and Memory). Claims can request specific size and access modes (e.g, can be mounted once read/write or many times read-only). +A ```PersistentVolume``` (PV) is a piece of networked storage in the cluster that has been provisioned by an administrator. It is a resource in the cluster just like a node is a cluster resource. PVs are volume plugins like Volumes, but have a lifecycle independent of any individual pod that uses the PV. This API object captures the details of the implementation of the storage, be that NFS, iSCSI, or a cloud-provider-specific storage system. + +A ```PersistentVolumeClaim``` (PVC) is a request for storage by a user. It is similar to a pod. Pods consume node resources and PVCs consume PV resources. Pods can request specific levels of resources (CPU and Memory). Claims can request specific size and access modes (e.g, can be mounted once read/write or many times read-only). Please see the [detailed walkthrough with working examples](https://github.com/GoogleCloudPlatform/kubernetes/tree/master/examples/persistent-volumes). @@ -15,35 +17,37 @@ PVs are resources in the cluster. PVC are requests for those resources and also ### Provisioning -The volume is created by an administrator. It becomes a cluster resource available for consumption. +A cluster administrator creates some number of PVs. They carry the details of the real storage that is available for use by cluster users. They exist in the Kubernetes API and are available for consumption. ### Binding -A persistent volume claim is created by a user requesting a specific amount of storage and with certain access modes. There is a process watching for new claims that binds them to an available volume if a match is available. The user will always get at least what they asked for, but the volume may be in excess of what was requested. +A user creates a ```PersistentVolumeClaim``` with a specific amount of storage requested and with certain access modes. A control loop in the master watches for new PVCs, finds a matching PV (if possible), and binds them together. The user will always get at least what they asked for, but the volume may be in excess of what was requested. Claims will remain unbound indefinitely if a matching volume does not exist. Claims will be bound as matching volumes become available. For example, a cluster provisioned with many 50Gi volumes would not match a PVC requesting 100Gi. The PVC can be bound when a 100Gi PV is added to the cluster. ### Using -Pods use their claim as a volume. The cluster uses the claim to find the bound volume bound and mounts that volume for the user. For those volumes that support multiple access modes, the user specifies which mode desired when using their claim as a volume in a pod. +Pods use claims as volumes. The cluster inspects the claim to find the bound volume and mounts that volume for a pod. For those volumes that support multiple access modes, the user specifies which mode desired when using their claim as a volume in a pod. + +Once a user has a claim and that claim is bound, the bound PV belongs to the user for as long as she needs it. Users schedule Pods and access their their claimed PVs by including a persistentVolumeClaim in their Pod's volumes block. [See below for syntax details](#claims-as-volumes). ### Releasing -When a user is done with their volume, they can delete their claim which allows reclamation of the resource. The volume is considered "released" when the claim is deleted, but it is not yet available for another claim. The previous claimant's data remains on the volume which must be handled according to policy. +When a user is done with their volume, they can delete the PVC objects from the API which allows reclamation of the resource. The volume is considered "released" when the claim is deleted, but it is not yet available for another claim. The previous claimant's data remains on the volume which must be handled according to policy. ### Reclaiming -A persistent volume's reclaim policy tells the cluster what to do with the volume after it's released. Currently, volumes can either be Retained or Recycled. Retention allows for manual reclamation of the resource. For those volume plugins that support it, recycling performs a basic scrub ("rm -rf /thevolume/*") on the volume and makes it available again for a new claim. +A ```PersistentVolume's``` reclaim policy tells the cluster what to do with the volume after it's released. Currently, volumes can either be Retained or Recycled. Retention allows for manual reclamation of the resource. For those volume plugins that support it, recycling performs a basic scrub ("rm -rf /thevolume/*") on the volume and makes it available again for a new claim. ## Types of Persistent Volumes -Persistent volumes are implemented as plugins. Kubernetes currently supports the following plugins: +```PersistentVolume```s are implemented as plugins. Kubernetes currently supports the following plugins: * GCEPersistentDisk * AWSElasticBlockStore * NFS -* ISCSI -* RBD +* iSCSI +* RBD (Ceph Block Device) * Glusterfs * HostPath (single node testing only) @@ -52,6 +56,7 @@ Persistent volumes are implemented as plugins. Kubernetes currently supports th Each PV contains a spec and status, which is the specification and status of the volume. + ``` apiVersion: v1 @@ -67,8 +72,6 @@ Each PV contains a spec and status, which is the specification and status of the nfs: path: /tmp server: 172.17.0.2 - status: - phase: Bound ``` @@ -80,7 +83,7 @@ Currently, storage size is the only resource that can be set or requested. Futu ### Access Modes -Persistent Volumes can be mounted on a host in any way supported by the resource provider. Providers will have different capabilities and each PV's access modes are set to the specific modes supported by that particular volume. For example, NFS can support multiple read/write clients, but a specific NFS PV might be exported on the server as read-only. Each PV gets its own set of access modes describing that specific PV's capabilities. +```PersistentVolume```s can be mounted on a host in any way supported by the resource provider. Providers will have different capabilities and each PV's access modes are set to the specific modes supported by that particular volume. For example, NFS can support multiple read/write clients, but a specific NFS PV might be exported on the server as read-only. Each PV gets its own set of access modes describing that specific PV's capabilities. The access modes are: @@ -117,7 +120,7 @@ A volume will be in one of the following phases: The CLI will show the name of the PVC bound to the PV. -## Persistent Volume Claims +## PersistentVolumeClaims Each PVC contains a spec and status, which is the specification and status of the claim. @@ -135,6 +138,7 @@ spec: storage: 8Gi ``` + ### Access Modes Claims use the same conventions as volumes when requesting storage with specific access modes. @@ -143,9 +147,9 @@ Claims use the same conventions as volumes when requesting storage with specific Claims, like pods, can request specific quantities of a resource. In this case, the request is for storage. The same [resource model](./resources.md) applies to both volumes and claims. -## Claims As Volumes +## Claims As Volumes -Pods access storage by using the claim as a volume. Claims must exist in the same namespace as the pod using the claim. The cluster finds the claim in the pod's namespace and uses it to get the persistent volume backing the claim. The volume is then mounted to the host and into the pod. +Pods access storage by using the claim as a volume. Claims must exist in the same namespace as the pod using the claim. The cluster finds the claim in the pod's namespace and uses it to get the ```PersistentVolume``` backing the claim. The volume is then mounted to the host and into the pod. ``` From bd365dda39555ccf09aa84eac3194017a3e0e9b9 Mon Sep 17 00:00:00 2001 From: markturansky Date: Thu, 2 Jul 2015 09:25:40 -0400 Subject: [PATCH 4/4] single ticked individually highlighted words --- docs/persistent-volumes.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/persistent-volumes.md b/docs/persistent-volumes.md index 501ff77d9e5..e66f232c723 100644 --- a/docs/persistent-volumes.md +++ b/docs/persistent-volumes.md @@ -1,12 +1,12 @@ # Persistent Volumes and Claims -This document describes the current state of ```PersistentVolumes``` in Kubernetes. Familiarity with [volumes](./volumes.md) is suggested. +This document describes the current state of `PersistentVolumes` in Kubernetes. Familiarity with [volumes](./volumes.md) is suggested. -Managing storage is a distinct problem from managing compute. The ```PersistentVolume``` subsystem provides an API for users and administrators that abstracts details of how storage is provided from how it is consumed. To do this we introduce two new API resources: ```PersistentVolume``` and ```PersistentVolumeClaim```. +Managing storage is a distinct problem from managing compute. The `PersistentVolume` subsystem provides an API for users and administrators that abstracts details of how storage is provided from how it is consumed. To do this we introduce two new API resources: `PersistentVolume` and `PersistentVolumeClaim`. -A ```PersistentVolume``` (PV) is a piece of networked storage in the cluster that has been provisioned by an administrator. It is a resource in the cluster just like a node is a cluster resource. PVs are volume plugins like Volumes, but have a lifecycle independent of any individual pod that uses the PV. This API object captures the details of the implementation of the storage, be that NFS, iSCSI, or a cloud-provider-specific storage system. +A `PersistentVolume` (PV) is a piece of networked storage in the cluster that has been provisioned by an administrator. It is a resource in the cluster just like a node is a cluster resource. PVs are volume plugins like Volumes, but have a lifecycle independent of any individual pod that uses the PV. This API object captures the details of the implementation of the storage, be that NFS, iSCSI, or a cloud-provider-specific storage system. -A ```PersistentVolumeClaim``` (PVC) is a request for storage by a user. It is similar to a pod. Pods consume node resources and PVCs consume PV resources. Pods can request specific levels of resources (CPU and Memory). Claims can request specific size and access modes (e.g, can be mounted once read/write or many times read-only). +A `PersistentVolumeClaim` (PVC) is a request for storage by a user. It is similar to a pod. Pods consume node resources and PVCs consume PV resources. Pods can request specific levels of resources (CPU and Memory). Claims can request specific size and access modes (e.g, can be mounted once read/write or many times read-only). Please see the [detailed walkthrough with working examples](https://github.com/GoogleCloudPlatform/kubernetes/tree/master/examples/persistent-volumes). @@ -21,7 +21,7 @@ A cluster administrator creates some number of PVs. They carry the details of th ### Binding -A user creates a ```PersistentVolumeClaim``` with a specific amount of storage requested and with certain access modes. A control loop in the master watches for new PVCs, finds a matching PV (if possible), and binds them together. The user will always get at least what they asked for, but the volume may be in excess of what was requested. +A user creates a `PersistentVolumeClaim` with a specific amount of storage requested and with certain access modes. A control loop in the master watches for new PVCs, finds a matching PV (if possible), and binds them together. The user will always get at least what they asked for, but the volume may be in excess of what was requested. Claims will remain unbound indefinitely if a matching volume does not exist. Claims will be bound as matching volumes become available. For example, a cluster provisioned with many 50Gi volumes would not match a PVC requesting 100Gi. The PVC can be bound when a 100Gi PV is added to the cluster. @@ -37,11 +37,11 @@ When a user is done with their volume, they can delete the PVC objects from the ### Reclaiming -A ```PersistentVolume's``` reclaim policy tells the cluster what to do with the volume after it's released. Currently, volumes can either be Retained or Recycled. Retention allows for manual reclamation of the resource. For those volume plugins that support it, recycling performs a basic scrub ("rm -rf /thevolume/*") on the volume and makes it available again for a new claim. +A `PersistentVolume's` reclaim policy tells the cluster what to do with the volume after it's released. Currently, volumes can either be Retained or Recycled. Retention allows for manual reclamation of the resource. For those volume plugins that support it, recycling performs a basic scrub ("rm -rf /thevolume/*") on the volume and makes it available again for a new claim. ## Types of Persistent Volumes -```PersistentVolume```s are implemented as plugins. Kubernetes currently supports the following plugins: +`PersistentVolume`s are implemented as plugins. Kubernetes currently supports the following plugins: * GCEPersistentDisk * AWSElasticBlockStore @@ -77,13 +77,13 @@ Each PV contains a spec and status, which is the specification and status of the ### Capacity -Generally, a PV will have a specific storage capacity. This is set using the PV's ```capacity``` attribute. See the Kubernetes [Resource Model](./resources.md) to understand the units expected by ```capacity```. +Generally, a PV will have a specific storage capacity. This is set using the PV's `capacity` attribute. See the Kubernetes [Resource Model](./resources.md) to understand the units expected by `capacity`. Currently, storage size is the only resource that can be set or requested. Future attributes may include IOPS, throughput, etc. ### Access Modes -```PersistentVolume```s can be mounted on a host in any way supported by the resource provider. Providers will have different capabilities and each PV's access modes are set to the specific modes supported by that particular volume. For example, NFS can support multiple read/write clients, but a specific NFS PV might be exported on the server as read-only. Each PV gets its own set of access modes describing that specific PV's capabilities. +`PersistentVolume`s can be mounted on a host in any way supported by the resource provider. Providers will have different capabilities and each PV's access modes are set to the specific modes supported by that particular volume. For example, NFS can support multiple read/write clients, but a specific NFS PV might be exported on the server as read-only. Each PV gets its own set of access modes describing that specific PV's capabilities. The access modes are: @@ -149,7 +149,7 @@ Claims, like pods, can request specific quantities of a resource. In this case, ## Claims As Volumes -Pods access storage by using the claim as a volume. Claims must exist in the same namespace as the pod using the claim. The cluster finds the claim in the pod's namespace and uses it to get the ```PersistentVolume``` backing the claim. The volume is then mounted to the host and into the pod. +Pods access storage by using the claim as a volume. Claims must exist in the same namespace as the pod using the claim. The cluster finds the claim in the pod's namespace and uses it to get the `PersistentVolume` backing the claim. The volume is then mounted to the host and into the pod. ```