Block storage allows a single pod to mount storage. This page shows how to create a simple web application on Kubernetes using persistent volumes enabled by Rook.
Provision Storage
Note
This sample requires at least 1 OSD per node, with each OSD located on 3 different nodes.
Before Rook can provision storage, a CephBlockPool
and StorageClass
need to be created. This will allow Kubernetes to interoperate with Rook when provisioning PVs. So let's create these two components
Inside the same folder there are other files, including pod.yaml
and pvc.yaml
, useful for carrying out some quick tests. Of course both components present in the storageclass.yaml
file can be modified according to your needs. As for the first, you will find more details here. Instead for the second, try to test the behavior of the parameters seen in the Storage chapter, that is
Since block storage allows a single pod to mount storage, only an accessMode
of type RWO (ReadWriteOnce) is allowed, when instantiating a PVC.
Teardown
To clean up all the artifacts created