Add docs for volume cloning (#14591)

This commit is contained in:
John Griffith
2019-05-30 18:38:24 -06:00
committed by Kubernetes Prow Robot
parent c7c55c5883
commit b8759a7dbe
2 changed files with 95 additions and 0 deletions
@@ -680,6 +680,33 @@ spec:
storage: 10Gi
```
## Volume Cloning
{{< feature-state for_k8s_version="v1.15" state="alpha" >}}
Volume clone feature was added to support CSI Volume Plugins only. For details, see [volume cloning](/docs/concepts/storage/volume-pvc-datasource/).
To enable support for cloning a volume from a pvc data source, enable the
`VolumePVCDataSource` feature gate on the apiserver and controller-manager.
### Create Persistent Volume Claim from an existing pvc
```yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: cloned-pvc
spec:
storageClassName: my-csi-plugin
dataSource:
name: existing-src-pvc-name
kind: PersistentVolumeClaim
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
```
## Writing Portable Configuration
If you're writing configuration templates or examples that run on a wide range of clusters