Quobyte CSI is the implementation of Container Storage Interface (CSI). Quobyte CSI enables easy integration of Quobyte Storage into Kubernetes. Current Quobyte CSI plugin supports the following functionality
- Dynamic volume Create
- Volume Delete
- Pre-provisioned volumes (Delete policy does not apply to these volumes)
- Kubernetes v1.10.7 or higher
- Quobyte installation with reachable registry and api services from the nodes
- Quobyte client with
QUOBYTE_REGISTRYenvironment variable set with Quobyte registryQUOBYTE_MOUNT_POINTenvironment variable set to/mnt/quobyte/mounts- host path volume
/mnt/quobyte
- Additionally, Kubernetes CSI requires some Kubernetes helper containers and corresponding RBAC permissions
Deploy RBAC as required by CSI and CSI helper containers along with Quobyte CSI plugin containers
kubectl create -f deploy/attacher-rbac.yaml
kubectl create -f deploy/nodeplugin-rbac.yaml
kubectl create -f deploy/provisioner-rbac.yaml
kubectl create -f deploy/attacher.yaml
kubectl create -f deploy/plugin.yaml
kubectl create -f deploy/provisioner.yamlQuobyte requires a secret to authenticate volume create and delete requests. Create this secret with
your Quobyte login credentials. Kubernetes requires base64 encoding for secrets which can be created
with the command echo -n "<user>" | base64.
kubectl create -f example/csi-secret.yamlCreate a storage class with the provisioner set to quobyte-csi along with other configuration
parameters.
kubectl create -f example/StorageClass.yamlCreating a PVC referencing the storage class created in previous step would provision dynamic volume.The provisoning happens through Kubernetes CSI - creates the PV inside Kubernetes and Quobyte CSI- provisions the volume for created PV.
kubectl create -f example/pvc-dynamic-provision.yamlMount the PVC in a pod as shown in the following example
kubectl create -f example/pod-with-dynamic-vol.yamlQuobyte CSI requires the volume UUID to be passed on to the PV as VolumeHandle
In order to use the test volume belonging to the tenant My Test, user needs to create a PV
referring the volume as shown in the example/pv-existing-vol.yaml
NOTE:
- Quobyte-csi supports both volume name and UUID
- To use Volume Name
VolumeHandleshould be of the format<API_URL>|<Tenant_Name/UUID>|<Volume_Name>andnodePublishSecretRefwith Quobyte API login credentials should be specified as shown in the example PVexample/pv-existing-vol.yaml - To use Volume UUID
VolumeHandlecan be||<Volume_UUID>.
- To use Volume Name
kubectl create -f example/pv-existing-vol.yamlCreate a PVC that matches the storage requirements with the above PV (make sure both PV and PVC refer to the same storage class)
kubectl create -f example/pvc-existing-vol.yamlCreate a pod referring the PVC as shown in the below example
kubectl create -f example/pod-with-existing-vol.yaml