You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

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 StorageClass and CephBlockPool need to be created. This will allow Kubernetes to interoperate with Rook when provisioning PVs. So let's create these two components

SC and CephBlockPool
# The file, located in "rook/cluster/examples/kubernetes/ceph/csi/rbd", already contains both components
$ kubectl create -f storageclass.yaml

Inside the same folder there are other files, including pod.yaml and pvc.yaml, useful for carrying out some quick tests. Of course the SC present in the storageclass.yaml file can be modified according to your needs. Try to test the behavior of the parameters seen in the Storage chapter, that is

SC parameters
allowVolumeExpansion: true	# false
volumeBindingMode: Immediate	# WaitForFirstConsumer
reclaimPolicy: Delete	# Retain
  • No labels