Move provisioning examples out of 'experimental' directory.

Dynamic provisioning is pretty stable now.
This commit is contained in:
Jan Safranek 2017-01-06 13:58:04 +01:00
parent 7171f6fd5f
commit 907c4ad98d
13 changed files with 13 additions and 13 deletions

View File

@ -1,6 +1,6 @@
## Persistent Volume Provisioning ## Persistent Volume Provisioning
This example shows how to use experimental persistent volume provisioning. This example shows how to use dynamic persistent volume provisioning.
### Prerequisites ### Prerequisites
@ -191,19 +191,19 @@ parameters:
First create Quobyte admin's Secret in the system namespace. Here the Secret is created in `kube-system`: First create Quobyte admin's Secret in the system namespace. Here the Secret is created in `kube-system`:
``` ```
$ kubectl create -f examples/experimental/persistent-volume-provisioning/quobyte/quobyte-admin-secret.yaml --namespace=kube-system $ kubectl create -f examples/persistent-volume-provisioning/quobyte/quobyte-admin-secret.yaml --namespace=kube-system
``` ```
Then create the Quobyte storage class: Then create the Quobyte storage class:
``` ```
$ kubectl create -f examples/experimental/persistent-volume-provisioning/quobyte/quobyte-storage-class.yaml $ kubectl create -f examples/persistent-volume-provisioning/quobyte/quobyte-storage-class.yaml
``` ```
Now create a PVC Now create a PVC
``` ```
$ kubectl create -f examples/experimental/persistent-volume-provisioning/claim1.json $ kubectl create -f examples/persistent-volume-provisioning/claim1.json
``` ```
Check the created PVC: Check the created PVC:
@ -239,7 +239,7 @@ No events.
Create a Pod to use the PVC: Create a Pod to use the PVC:
``` ```
$ kubectl create -f examples/experimental/persistent-volume-provisioning/quobyte/example-pod.yaml $ kubectl create -f examples/persistent-volume-provisioning/quobyte/example-pod.yaml
``` ```
#### Azure Disk #### Azure Disk
@ -263,7 +263,7 @@ parameters:
### User provisioning requests ### User provisioning requests
Users request dynamically provisioned storage by including a storage class in their `PersistentVolumeClaim`. Users request dynamically provisioned storage by including a storage class in their `PersistentVolumeClaim`.
The annotation `volume.beta.kubernetes.io/storage-class` is used to access this experimental feature. It is required that this value matches the name of a `StorageClass` configured by the administrator. The annotation `volume.beta.kubernetes.io/storage-class` is used to access this feature. It is required that this value matches the name of a `StorageClass` configured by the administrator.
In the future, the storage class may remain in an annotation or become a field on the claim itself. In the future, the storage class may remain in an annotation or become a field on the claim itself.
``` ```
@ -302,10 +302,10 @@ and automatically bound to the claim requesting storage.
``` ```
$ kubectl get pv $ kubectl get pv
$ kubectl create -f examples/experimental/persistent-volume-provisioning/gce-pd.yaml $ kubectl create -f examples/persistent-volume-provisioning/gce-pd.yaml
storageclass "slow" created storageclass "slow" created
$ kubectl create -f examples/experimental/persistent-volume-provisioning/claim1.json $ kubectl create -f examples/persistent-volume-provisioning/claim1.json
persistentvolumeclaim "claim1" created persistentvolumeclaim "claim1" created
$ kubectl get pv $ kubectl get pv
@ -353,10 +353,10 @@ From the key value, we will create a secret. We must create the Ceph admin Secre
$ kubectl create secret generic ceph-secret-admin --from-literal=key='AQBfxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==' --namespace=kube-system --type=kubernetes.io/rbd $ kubectl create secret generic ceph-secret-admin --from-literal=key='AQBfxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==' --namespace=kube-system --type=kubernetes.io/rbd
``` ```
Now modify `examples/experimental/persistent-volume-provisioning/rbd/rbd-storage-class.yaml` to reflect your environment, particularly the `monitors` field. We are now ready to create our RBD Storage Class: Now modify `examples/persistent-volume-provisioning/rbd/rbd-storage-class.yaml` to reflect your environment, particularly the `monitors` field. We are now ready to create our RBD Storage Class:
``` ```
$ kubectl create -f examples/experimental/persistent-volume-provisioning/rbd/rbd-storage-class.yaml $ kubectl create -f examples/persistent-volume-provisioning/rbd/rbd-storage-class.yaml
``` ```
The kube-controller-manager is now able to provision storage, however we still need to be able to map the RBD volume to a node. Mapping should be done with a non-privileged key, if you have existing users you can get all keys by running `ceph auth list` on your Ceph cluster with the admin key. For this example we will create a new user and pool. The kube-controller-manager is now able to provision storage, however we still need to be able to map the RBD volume to a node. Mapping should be done with a non-privileged key, if you have existing users you can get all keys by running `ceph auth list` on your Ceph cluster with the admin key. For this example we will create a new user and pool.
@ -382,7 +382,7 @@ You are now ready to provision and use RBD storage.
With the storageclass configured, let's create a PVC in our example namespace, `myns`: With the storageclass configured, let's create a PVC in our example namespace, `myns`:
``` ```
$ kubectl create -f examples/experimental/persistent-volume-provisioning/claim1.json --namespace=myns $ kubectl create -f examples/persistent-volume-provisioning/claim1.json --namespace=myns
``` ```
Eventually the PVC creation will result in a PV and RBD volume to match: Eventually the PVC creation will result in a PV and RBD volume to match:
@ -423,7 +423,7 @@ No events.
With our storage provisioned, we can now create a Pod to use the PVC: With our storage provisioned, we can now create a Pod to use the PVC:
``` ```
$ kubectl create -f examples/experimental/persistent-volume-provisioning/rbd/pod.yaml --namespace=myns $ kubectl create -f examples/persistent-volume-provisioning/rbd/pod.yaml --namespace=myns
``` ```
Now our pod has an RBD mount! Now our pod has an RBD mount!
@ -435,5 +435,5 @@ $ kubectl exec -it $PODNAME --namespace=myns -- df -h | grep rbd
``` ```
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/examples/experimental/persistent-volume-provisioning/README.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/examples/persistent-volume-provisioning/README.md?pixel)]()
<!-- END MUNGE: GENERATED_ANALYTICS --> <!-- END MUNGE: GENERATED_ANALYTICS -->