Skip to content

Commit aa1b275

Browse files
adiskyk8s-ci-robot
authored andcommitted
Document for Inline Support (#820)
* Update using-cinder-csi-plugin.md * update doc to k8sv1.16
1 parent 369d2f8 commit aa1b275

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

docs/using-cinder-csi-plugin.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,35 @@ $ kubectl exec nginx -- df -h /var/lib/www/html
297297
Filesystem Size Used Avail Use% Mounted on
298298
/dev/vdb 2.0G 27M 1.97G 1% /var/lib/www/html
299299
```
300+
## Inline Volumes
301+
This feature allows CSI volumes to be directly embedded in the Pod specification instead of a PersistentVolume. Volumes specified in this way are ephemeral and do not persist across Pod restarts. As of Kubernetes v1.16 this feature is beta so enabled by default. To enable this feature for CSI Driver, `volumeLifecycleModes` needs to be specified in [CSIDriver](https://github.com/kubernetes/cloud-provider-openstack/blob/master/manifests/cinder-csi-plugin/csi-cinder-driver.yaml) object. The driver can run in `Persistent` mode, `Ephemeral` or in both modes. `podInfoOnMount` must be `true` to use this feature.
302+
303+
Example:
304+
1. Deploy CSI Driver, in default yamls both modes are enabled.
305+
```
306+
$ kubectl create -f manifests/cinder-csi-plugin/
307+
```
308+
2. Create a pod with inline volume
309+
```
310+
$ kubectl create -f examples/cinder-csi-plugin/inline/inline-example.yaml
311+
```
312+
3. Get the pod description, verify created volume in Volumes section.
313+
```
314+
$ kubectl describe pod
315+
316+
Volumes:
317+
my-csi-volume:
318+
Type: CSI (a Container Storage Interface (CSI) volume source)
319+
Driver: cinder.csi.openstack.org
320+
FSType: ext4
321+
ReadOnly: false
322+
VolumeAttributes: capacity=1Gi
323+
default-token-dn78p:
324+
Type: Secret (a volume populated by a Secret)
325+
SecretName: default-token-dn78p
326+
Optional: false
327+
328+
```
300329

301330
## Running Sanity Tests
302331

0 commit comments

Comments
 (0)