Skip to content

Commit

Permalink
Merge pull request #43326 from chakri-nelluri/flexdocs
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue

Update flex volume 1.6 documentation.

**What this PR does / why we need it**:
Update documentation for 1.6 flex volume changes.
  • Loading branch information
Kubernetes Submit Queue authored Mar 23, 2017
2 parents b1e665f + 399fe51 commit 5d7ff2a
Showing 1 changed file with 1 addition and 84 deletions.
85 changes: 1 addition & 84 deletions examples/volumes/flexvolume/README.md
Original file line number Diff line number Diff line change
@@ -1,84 +1 @@
# Flexvolume

Flexvolume enables users to mount vendor volumes into kubernetes. It expects vendor drivers are installed in the volume plugin path on every kubelet node.

It allows for vendors to develop their own drivers to mount volumes on nodes.

*Note: Flexvolume is an alpha feature and is most likely to change in future*

## Prerequisites

Install the vendor driver on all nodes in the kubelet plugin path. Path for installing the plugin: /usr/libexec/kubernetes/kubelet-plugins/volume/exec/\<vendor~driver\>/\<driver\>

For example to add a 'cifs' driver, by vendor 'foo' install the driver at: /usr/libexec/kubernetes/kubelet-plugins/volume/exec/\<foo~cifs\>/cifs

## Plugin details

Driver will be invoked with 'Init' to initialize the driver. It will be invoked with 'attach' to attach the volume and with 'detach' to detach the volume from the kubelet node. It also supports custom mounts using 'mount' and 'unmount' callouts to the driver.

### Driver invocation model:

Init:

```
<driver executable> init
```

Attach:

```
<driver executable> attach <json options>
```

Detach:

```
<driver executable> detach <mount device>
```

Mount:

```
<driver executable> mount <target mount dir> <mount device> <json options>
```

Unmount:

```
<driver executable> unmount <mount dir>
```

See [lvm](lvm) for a quick example on how to write a simple flexvolume driver.

### Driver output:

Flexvolume expects the driver to reply with the status of the operation in the
following format.

```
{
"status": "<Success/Failure>",
"message": "<Reason for success/failure>",
"device": "<Path to the device attached. This field is valid only for attach calls>"
}
```

### Default Json options

In addition to the flags specified by the user in the Options field of the FlexVolumeSource, the following flags are also passed to the executable.

```
"kubernetes.io/fsType":"<FS type>",
"kubernetes.io/readwrite":"<rw>",
"kubernetes.io/secret/key1":"<secret1>"
...
"kubernetes.io/secret/keyN":"<secretN>"
```

### Example of Flexvolume

See [nginx.yaml](nginx.yaml) for a quick example on how to use Flexvolume in a pod.

<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/examples/volumes/flexvolume/README.md?pixel)]()
<!-- END MUNGE: GENERATED_ANALYTICS -->
Please refer to https://github.com/kubernetes/community/tree/master/contributors/devel/flexvolume.md for documentation.

0 comments on commit 5d7ff2a

Please sign in to comment.