From c7e930d77cbe90f80b8de7bb792df20a17a5d910 Mon Sep 17 00:00:00 2001 From: Misty Stanley-Jones Date: Tue, 5 Jun 2018 15:49:20 -0700 Subject: [PATCH] Copyedit --- .../concepts/storage/persistent-volumes.md | 38 +++++++++++-------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/content/en/docs/concepts/storage/persistent-volumes.md b/content/en/docs/concepts/storage/persistent-volumes.md index f1bfd78a3118b..84a640e21aa8d 100644 --- a/content/en/docs/concepts/storage/persistent-volumes.md +++ b/content/en/docs/concepts/storage/persistent-volumes.md @@ -167,8 +167,10 @@ However, the particular path specified in the custom recycler pod template in th ### Expanding Persistent Volumes Claims -Kubernetes 1.8 added Alpha support for expanding persistent volumes. In Kubernetes 1.11 this feature has been moved to beta and will -be enabled by default. Volume expansion is supported for following volume types: +{{< feature-state for_k8s_version="v1.8" state="alpha" >}} +{{< feature-state for_k8s_version="v1.11" state="beta" >}} +Support for expanding PersistentVolumeClaims (PVCs) is now enabled by default. You can expand +the following types of volumes: * gcePersistentDisk * awsElasticBlockStore @@ -179,7 +181,7 @@ be enabled by default. Volume expansion is supported for following volume types: * Azure Disk * Portworx -Volume expansion will only be allowed for `PersistentVolumeClaim` whose storage classes has `allowVolumeExpansion` field set to true. +You can only expand a PVC if its storage class's `allowVolumeExpansion` field is set to true. ``` yaml kind: StorageClass @@ -195,27 +197,33 @@ parameters: allowVolumeExpansion: true ``` -A user can request larger volume for their `PersistentVolumeClaim` by simply editing the claim and requesting a larger size. This in turn will trigger expansion of the volume that is backing the underlying `PersistentVolume`. +To request a larger volume for a PVC, edit the PVC's configuration and request a larger +size. This triggers expansion of the volume that backs the underlying `PersistentVolume`. A +new `PersistentVolume` is never created to satisfy the claim. Instead, an existing volume is resized. -Under no circumstances will a new `PersistentVolume` be created to satisfy the claim. Kubernetes will instead attempt to resize the existing volume. +#### Resizing a volume containing a file system -For expanding volumes containing a file system, file system resizing is only performed when a new Pod is started using the `PersistentVolumeClaim` in -ReadWrite mode. In other words, if a volume being expanded is used in a pod or deployment, you will need to delete or recreate the pod after volume -has been expanded by Cloud Provider in controller-manager. You can check status of resize operation by running command: +You can only resize volumes containing a file system if the file system is XFS, Ext3, or Ext4. + +When a volume contains a file system, the file system is only resized when a new Pod is started using +the `PersistentVolumeClaim` in ReadWrite mode. Therefore, if a pod or deployment is using a volume and +you want to expand it, you need to delete or recreate the pod after the volume has been exxpanded by the cloud provider in the controller-manager. You can check the status of resize operation by running the `kubectl describe pvc` command: ``` kubectl describe pvc ``` -And if `PersistentVolumeClaim` has status `FileSystemResizePending` then you can go ahead and recreate the pod that is using the PVC. Also, file system resizing is only supported for following file system types: +If the `PersistentVolumeClaim` has the status `FileSystemResizePending`, it is safe to recreate the pod using the PersistentVolumeClaim. + +#### Resizing an in-use PersistentVolumeClaim -* XFS -* Ext3, Ext4 +{{< feature-state for_k8s_version="v1.11" state="alpha" >}} -Kubernetes 1.11 also ships with an alpha feature to enable expansion of in-use PVCs. If `ExpandInUsePersistentVolumes` feature gate is set to true -then user no longer has to delete and recreate Pod that was using the PVC. Any in-use PVCs will automatically have their file system expanded and -available for use within the pod. This feature however does not support expanding PVCs which are not in-use by a pod. User must create a pod with -PVC to finish file system resize on volumes that were resized when not in-use by a pod. +Expanding in-use PVCs is an alpha feature. To use it, enable the `ExpandInUsePersistentVolumes` feature gate. +In this case, you don't need to delete and recreate a Pod or deployment that is using an existing PVC. +Any in-use PVC automatically becomes available to its Pod as soon as its file system has been expanded. +This feature has no effect on PVCs that are not in use by a Pod or deployment. You must create a Pod which +uses the PVC before the expansion can complete. {{< note >}} **Note:** Expanding EBS volumes is a time consuming operation. Also, there is a per-volume quota of one modification every 6 hours.