Available in editions: CE, SE, SE+, EE | Доступно в редакциях: CE, SE, SE+, EE, CSE Pro (1.64) |
Ceph is a scalable distributed storage system that ensures high availability and fault tolerance of data. Deckhouse supports integration with Ceph clusters, enabling dynamic storage management and the use of StorageClass based on RBD (RADOS Block Device) or CephFS. | Подробнее см. в разделе Условия и цены. |
This page provides instructions on connecting Ceph to Deckhouse, configuring authentication, creating StorageClass objects, and verifying storage functionality. | Ceph — это масштабируемая распределённая система хранения, обеспечивающая высокую доступность и отказоустойчивость данных. В Deckhouse поддерживается интеграция с Ceph-кластерами, что позволяет динамически управлять хранилищем и использовать StorageClass на основе RBD (RADOS Block Device) или CephFS. |
Enabling the module | На этой странице представлены инструкции по подключению Ceph в Deckhouse, настройке аутентификации, созданию объектов StorageClass, а также проверке работоспособности хранилища. |
To connect a Ceph cluster in Deckhouse, you need to enable the | Включение модуля |
yaml d8 k apply -f - «EOF apiVersion: deckhouse.io/v1alpha1 kind: ModuleConfig metadata: name: csi-ceph spec: enabled: true EOF | Для подключения Ceph-кластера в Deckhouse необходимо включить модуль |
Connecting to a Ceph cluster | yaml d8 k apply -f - «EOF apiVersion: deckhouse.io/v1alpha1 kind: ModuleConfig metadata: name: csi-ceph spec: enabled: true EOF |
To configure a connection to a Ceph cluster, apply the CephClusterConnection resource. Example usage: | Подключение к Ceph-кластеру |
yaml
d8 k apply -f - «EOF
apiVersion: storage.deckhouse.io/v1alpha1
kind: CephClusterConnection
metadata:
name: ceph-cluster-1
spec:
FSID/UUID of the Ceph cluster.
The FSID/UUID of the Ceph cluster can be obtained using the
| Чтобы настроить подключение к Ceph-кластеру, необходимо применить ресурс CephClusterConnection. Пример команды: |
You can check the connection status with the following command (the | yaml
d8 k apply -f - «EOF
apiVersion: storage.deckhouse.io/v1alpha1
kind: CephClusterConnection
metadata:
name: ceph-cluster-1
spec:
FSID/UUID Ceph-кластера.
Получить FSID/UUID Ceph-кластера можно с помощью команды
|
shell d8 k get cephclusterconnection ceph-cluster-1 | Проверить создание подключения можно командой (фаза должна быть в статусе |
Authentication | shell d8 k get cephclusterconnection ceph-cluster-1 |
To authenticate with the Ceph cluster, you need to define the authentication parameters in the CephClusterAuthentication resource: | Аутентификация |
yaml
d8 k apply -f - «EOF
apiVersion: storage.deckhouse.io/v1alpha1
kind: CephClusterAuthentication
metadata:
name: ceph-auth-1
spec:
User name without | Чтобы пройти аутентификацию в Ceph-кластере, необходимо определить параметры аутентификации в ресурсе CephClusterAuthentication: |
Creating StorageClass | yaml
d8 k apply -f - «EOF
apiVersion: storage.deckhouse.io/v1alpha1
kind: CephClusterAuthentication
metadata:
name: ceph-auth-1
spec:
Имя пользователя без |
The creation of StorageClass objects is done through the CephStorageClass resource, which defines the configuration for the desired StorageClass. Manually creating a StorageClass resource without CephStorageClass may lead to errors. Example of creating a StorageClass based on RBD (RADOS Block Device): | Создание StorageClass |
yaml d8 k apply -f - «EOF apiVersion: storage.deckhouse.io/v1alpha1 kind: CephStorageClass metadata: name: ceph-rbd-sc spec: clusterConnectionName: ceph-cluster-1 clusterAuthenticationName: ceph-auth-1 reclaimPolicy: Delete type: RBD rbd: defaultFSType: ext4 pool: ceph-rbd-pool EOF | Создание объектов StorageClass осуществляется через ресурс CephStorageClass, который определяет конфигурацию для желаемого класса хранения. Ручное создание ресурса StorageClass без CephStorageClass может привести к ошибкам. Пример создания StorageClass на основе RBD (RADOS Block Device): |
Example of creating a StorageClass based on Ceph file system: | yaml d8 k apply -f - «EOF apiVersion: storage.deckhouse.io/v1alpha1 kind: CephStorageClass metadata: name: ceph-rbd-sc spec: clusterConnectionName: ceph-cluster-1 clusterAuthenticationName: ceph-auth-1 reclaimPolicy: Delete type: RBD rbd: defaultFSType: ext4 pool: ceph-rbd-pool EOF |
yaml d8 k apply -f - «EOF apiVersion: storage.deckhouse.io/v1alpha1 kind: CephStorageClass metadata: name: ceph-fs-sc spec: clusterConnectionName: ceph-cluster-1 clusterAuthenticationName: ceph-auth-1 reclaimPolicy: Delete type: CephFS cephFS: fsName: cephfs EOF | Пример создания StorageClass на основе файловой системы Ceph: |
Check that the created CephStorageClass resources have transitioned to the | yaml d8 k apply -f - «EOF apiVersion: storage.deckhouse.io/v1alpha1 kind: CephStorageClass metadata: name: ceph-fs-sc spec: clusterConnectionName: ceph-cluster-1 clusterAuthenticationName: ceph-auth-1 reclaimPolicy: Delete type: CephFS cephFS: fsName: cephfs EOF |
shell d8 k get cephstorageclass | Проверьте, что созданные ресурсы CephStorageClass перешли в состояние |
In the output, you should see information about the created CephStorageClass resources: | shell d8 k get cephstorageclass |
console NAME PHASE AGE ceph-rbd-sc Created 1h ceph-fs-sc Created 1h | В результате будет выведена информация о созданных ресурсах CephStorageClass: |
Check the created StorageClass using the following command: | console NAME PHASE AGE ceph-rbd-sc Created 1h ceph-fs-sc Created 1h |
shell d8 k get sc | Проверьте созданный StorageClass с помощью следующей команды: |
In the output, you should see information about the created StorageClass: | shell d8 k get sc |
console NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE ceph-rbd-sc rbd.csi.ceph.com Delete WaitForFirstConsumer true 15s ceph-fs-sc rbd.csi.ceph.com Delete WaitForFirstConsumer true 15s | В результате будет выведена информация о созданном StorageClass: |
If the StorageClass objects appear, it means the | console NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE ceph-rbd-sc rbd.csi.ceph.com Delete WaitForFirstConsumer true 15s ceph-fs-sc rbd.csi.ceph.com Delete WaitForFirstConsumer true 15s |
Если объекты StorageClass появились, значит настройка модуля |