Ceph CSI Module - Ceph Block Device (shturval-ceph-rbd)

About the service

ParameterDescription
GUI nameCeph CSI Module - Ceph Block Device
System name (identifier)shturval-ceph-rbd
Cluster AssignmentDynamic provisioning of Ceph RBD block volumes; connecting RBD images from a Ceph cluster.
CriticalNo
Public repositoryCeph CSI
Dependenciesshturval-networking
Namespaceceph-rbd

Purpose

shturval-ceph-rbd is a Ceph CSI module for Ceph Block Device (RBD). Allows you to mount Ceph block volumes as PersistentVolume on demand via StorageClass.

Where to configure

Services and repositories → Installed services → shturval-ceph-rbd → Manage.

Setting up storage classes: StorageClasses. Customvalues specifies csiConfig (clusterID, monitors), a secret with adminID/adminKey and, if necessary, cephconf. The required Ceph user rights (capabilities) for RBD are described in the Ceph CSI documentation.

Installation and configuration

To work, shturval-networking must be running in the cluster. During installation, it is recommended to create a separate namespace for the chart.

If the Ceph CSI module was installed when creating the cluster, manual configuration is usually not required. To enable it in an already created cluster, use Services and Repositories → Installed Services or install the shturval-ceph-rbd chart from Available Charts. If you need to redefine chart parameters, apply the changes via ShturvalServicePatch.

In Service Specifications specify customvalues:

Example customvalues (Ceph RBD)
csiConfig:
  - clusterID: <your value>
    monitors:
      - <your value>
storageClass:
  create: true
  name: <your value>
  clusterID: <your value>
  dataPool: ""
  pool: <your value>
  # For MicroCeph, remove this parameter if you do not set RBD image features.
  imageFeatures: layering
  mounter: ""
  volumeNamePrefix: ""
  encrypted: ""
  encryptionKMSID: ""
  mapOptions: ""
  unmapOptions: ""
  provisionerSecret: <your value>
  provisionerSecretNamespace: <your value>
  controllerExpandSecret: <your value>
  controllerExpandSecretNamespace: <your value>
  nodeStageSecret: <your value>
  nodeStageSecretNamespace: <your value>
  fstype: ext4
  reclaimPolicy: <your value>
  allowVolumeExpansion: true
  mountOptions: []
selinuxMount: true
secret:
  create: true
  name: <your value>
  userID: <your value>
  userKey: <your value>
cephconf: |
    <your Ceph cluster configuration>

Important: For MicroCeph, do not leave storageClass.imageFeatures as an empty string (imageFeatures: ""). If the parameter is not required, remove it from customvalues; if it is required, specify supported RBD image features, for example layering. An empty value may cause an RBD connection error.

ParameterDescriptionExample
csiConfig[].clusterIDUnique Ceph cluster identifiermy-cluster-id
csiConfig[].monitorsList of IP addresses of Ceph monitors192.168.1.1
secret.nameName of the Secret being createdcephrbd-secret
secret.userIDCeph service account IDclient.admin
secret.userKeyCeph Service Account Keysdfdff
cephconfCeph configuration in text format[global] auth cluster required = cephx
storageClass.nameName of the created StorageClasscsi-cephrbd-sc
storageClass.clusterIDCeph Cluster IDcluster-id
storageClass.dataPoolErasure-coded pool for data if a separate EC pool is usedec-data-pool
storageClass.poolCeph pool for RBD imageskuberbd
storageClass.imageFeaturesOptional comma-separated list of RBD image features. Ceph CSI creates RBD images with image format 2 and supports layering, journaling, exclusive-lock, object-map, fast-diff, deep-flatten; see the Ceph RBD documentation for feature dependencieslayering
storageClass.mounterMount type, for example rbd-nbd; empty value uses default behaviorrbd-nbd
storageClass.volumeNamePrefixPrefix for RBD image namesshturval-
storageClass.encryptedEnable volume encryption with the string value true/false“true”
storageClass.mapOptionsMap options for krbd/nbdkrbd:lock_on_read
storageClass.unmapOptionsunmap options for krbd/nbdkrbd:force
storageClass.fstypeVolume file system type (default ext4)ext4
storageClass.reclaimPolicyVolume deletion policy (Retain, Delete, Recycle)Delete
selinuxMountMounting /etc/selinux host into pods for file systems with SELinuxtrue

Service account access rights

Minimum rights for Ceph user (client.kuberbd):

mon 'profile rbd'
osd 'profile rbd pool=kuberbd'

Configuration notes

Use the cephconf field for Ceph client parameters common to the cluster (authentication, network, etc.) - see examples in Ceph CSI documentation for RBD.

If you need to connect several Ceph RBD instances in one cluster:

  1. Install each instance in a separate namespace.
  2. Specify a unique value for the driverName parameter for each instance.
  3. Set a unique port in the nodePlugin.httpMetrics.ContainerPort parameter for each instance.

How to deploy this service - How to deploy a new service.