Once you have the Quobyte CSI Plugin and Quobyte client running on your Kubernetes cluster you are ready to serve persistent volume claims form Quobyte. Quobyte's Policy Engine gives you control over many aspects of your data, such as the redundancy mechanism (replication, EC or auto), storage media (flash, HDD or a combination of both), tiering, encryption, caching or QoS.
The first step is to "connect" your Kubernetes Storage Classes with the Quobyte policy engine. The easiest way is to add "labels". These labels are simple key-value pairs that are attached to the Quobyte volume when it is created by the CSI plugin. You can add labels to your storage class in the Parameters section. The labels are a comma separated list of key:value pairs:
apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: database provisioner: csi.quobyte.com allowVolumeExpansion: true parameters: quobyteTenant: "My Tenant" ... (see https://github.com/quobyte/quobyte-csi/blob/master/example/StorageClass.yaml for the full StorageClass) labels: "encrypted:yes,profile:database"
The second step is to create policies in Quobyte to map your storage class labels to behavior you want on Quobyte. Let's create our Policy for the database as an example:
Go to the Policy tab in the Quobyte webconsole and select "Create rule with custom policy..."from the dropdown:
Give the rule a name and a description. Then add a policy restriction for "volume" and select "volume label matches regexp" in the scope. Then add "profile" and "database" like in our StorageClass.yaml. This tells Quobyte to apply the policies to all volumes with matching labels.
The next step is to configure policies on how to handle the data on such a volume. Databases do a lot of random 4k IO, which is best suited for replication and flash media. Under the "File Placement Policies" subsection add the Tag based placement and select ssd:
This tells Quobyte to always put files on these volumes onto ssds. Then we add "File Redundancy" in the "File Creation Policies" tab and set it to REPLICATION.
Any volume with the Database storage class will now map onto a high performance random IO profile on Quobyte. You can change the policies at any time and most options will be applied immediately (such as cache settings), during a time you specified (data tiering and movement) or apply only to new files (such as redundancy mechanism).
How to set up shared file system (RWX) persistent volumes on Kubernetes with Quobyte
How to combine flash and HDD in Quobyte for fast and cost-effective Persistent Volumes
Consolidate your Kubernetes Storage with Quobyte's Multi-tenancy and Self-service.
Confused by PV, PCV, CSI? Read our gloassary on K8s storage terms.