Fix for Support selection of datastore for dynamic provisioning in vSphere
This commit is contained in:

committed by
Ritesh H Shukla

parent
b201ac2f8f
commit
12f75f0b86
@@ -202,7 +202,7 @@
|
||||
__Note: Here you don't need to create vmdk it is created for you.__
|
||||
1. Create Storage Class.
|
||||
|
||||
See example:
|
||||
Example 1:
|
||||
|
||||
```yaml
|
||||
kind: StorageClass
|
||||
@@ -216,6 +216,23 @@
|
||||
|
||||
[Download example](vsphere-volume-sc-fast.yaml?raw=true)
|
||||
|
||||
You can also specify the datastore in the Storageclass as shown in example 2. The volume will be created on the datastore specified in the storage class.
|
||||
This field is optional. If not specified as shown in example 1, the volume will be created on the datastore specified in the vsphere config file used to initialize the vSphere Cloud Provider.
|
||||
|
||||
Example 2:
|
||||
|
||||
```yaml
|
||||
kind: StorageClass
|
||||
apiVersion: storage.k8s.io/v1beta1
|
||||
metadata:
|
||||
name: fast
|
||||
provisioner: kubernetes.io/vsphere-volume
|
||||
parameters:
|
||||
diskformat: zeroedthick
|
||||
datastore: VSANDatastore
|
||||
```
|
||||
|
||||
[Download example](vsphere-volume-sc-with-datastore.yaml?raw=true)
|
||||
Creating the storageclass:
|
||||
|
||||
``` bash
|
||||
|
@@ -0,0 +1,8 @@
|
||||
kind: StorageClass
|
||||
apiVersion: storage.k8s.io/v1beta1
|
||||
metadata:
|
||||
name: fast
|
||||
provisioner: kubernetes.io/vsphere-volume
|
||||
parameters:
|
||||
diskformat: zeroedthick
|
||||
datastore: vsanDatastore
|
Reference in New Issue
Block a user