Demo
In this section, we'll walk through a demo that uses a StorageClass. The basic steps of the demo will be:
- Create a StorageClass.
- Create a PVC.
- Create a Pod.
The Pod will mount a volume using the PVC, which, in turn, will trigger the SC to dynamically create a PV. The demo will be on the Google Cloud Platform and assumes you have a working cluster with kubectl
correctly configured.
Cleanup
If you've been following along, you'll have a Pod, a PVC, and PV already created. Let's delete these before we go ahead with the demo:
$ kubectl delete pods volpod pod "volpod" deleted $ kubectl delete pvc pvc1 persistentvolumeclaim "pvc1" deleted $ kubectl delete pv pv1 persistentvolume "pv1" deleted
Creating a StorageClass
We'll use the following YAML to create a StorageClass called slow
based on Google GCE standard persistent disks. We won't get into the details of the storage backend, but suffice...