Add vSphere Storage class
This commit is contained in:
@@ -400,6 +400,20 @@ parameters:
|
|||||||
* `type`: [VolumeType](http://docs.openstack.org/admin-guide/dashboard-manage-volumes.html) created in Cinder. Default is empty.
|
* `type`: [VolumeType](http://docs.openstack.org/admin-guide/dashboard-manage-volumes.html) created in Cinder. Default is empty.
|
||||||
* `availability`: Availability Zone. Default is empty.
|
* `availability`: Availability Zone. Default is empty.
|
||||||
|
|
||||||
|
#### vSphere
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
kind: StorageClass
|
||||||
|
apiVersion: storage.k8s.io/v1beta1
|
||||||
|
metadata:
|
||||||
|
name: fast
|
||||||
|
provisioner: kubernetes.io/vsphere-volume
|
||||||
|
parameters:
|
||||||
|
diskformat: zeroedthick
|
||||||
|
```
|
||||||
|
|
||||||
|
* `diskformat`: `thin`, `zeroedthick` and `eagerzeroedthick`. Default: `"thin"`.
|
||||||
|
|
||||||
## Writing Portable Configuration
|
## Writing Portable Configuration
|
||||||
|
|
||||||
If you're writing configuration templates or examples that run on a wide range of clusters
|
If you're writing configuration templates or examples that run on a wide range of clusters
|
||||||
|
|||||||
@@ -475,18 +475,27 @@ More details can be found [here](https://github.com/kubernetes/kubernetes/tree/{
|
|||||||
|
|
||||||
### vsphereVolume
|
### vsphereVolume
|
||||||
|
|
||||||
A `vsphereVolume` is used to mount a vSphere VMDK Volume into your Pod. The contents
|
__Prerequisite: Kubernetes with vSphere Cloud Provider configured.
|
||||||
of a volume are preserved when it is unmounted.
|
For cloudprovider configuration please refer [vSphere getting started guide](http://kubernetes.io/docs/getting-started-guides/vsphere/).__
|
||||||
|
|
||||||
__Important: You must create a VMDK volume using `vmware-vdiskmanager -c` or
|
A `vsphereVolume` is used to mount a vSphere VMDK Volume into your Pod. The contents
|
||||||
the VSphere API before you can use it__
|
of a volume are preserved when it is unmounted. It supports both VMFS and VSAN datastore.
|
||||||
|
|
||||||
|
__Important: You must create VMDK using one of the following method before using with POD.__
|
||||||
|
|
||||||
#### Creating a VMDK volume
|
#### Creating a VMDK volume
|
||||||
|
|
||||||
Before you can use a vSphere volume with a pod, you need to create it.
|
* Create using vmkfstools.
|
||||||
|
|
||||||
|
First ssh into ESX and then use following command to create vmdk,
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
vmware-vdiskmanager -c -t 0 -s 40GB -a lsilogic myDisk.vmdk
|
vmkfstools -c 2G /vmfs/volumes/DatastoreName/volumes/myDisk.vmdk
|
||||||
|
```
|
||||||
|
|
||||||
|
* Create using vmware-vdiskmanager.
|
||||||
|
```shell
|
||||||
|
vmware-vdiskmanager -c -t 0 -s 40GB -a lsilogic myDisk.vmdk
|
||||||
```
|
```
|
||||||
|
|
||||||
#### vSphere VMDK Example configuration
|
#### vSphere VMDK Example configuration
|
||||||
@@ -507,9 +516,11 @@ spec:
|
|||||||
- name: test-volume
|
- name: test-volume
|
||||||
# This VMDK volume must already exist.
|
# This VMDK volume must already exist.
|
||||||
vsphereVolume:
|
vsphereVolume:
|
||||||
volumePath: myDisk
|
volumePath: "[DatastoreName] volumes/myDisk"
|
||||||
fsType: ext4
|
fsType: ext4
|
||||||
```
|
```
|
||||||
|
More examples can be found [here](https://github.com/kubernetes/kubernetes/tree/master/examples/volumes/vsphere).
|
||||||
|
|
||||||
|
|
||||||
### Quobyte
|
### Quobyte
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user