How to use ceph RBD in kubernetes
Today, I will talk to you about how to use ceph RBD in kubernetes. Many people may not know much about it. In order to make you understand better, the editor has summarized the following for you. I hope you can get something according to this article.
1. Create a Pool 1.1 Planning Pool in a Ceph Storage Cluster
Note: a large number of placement groups (for example, 100 per OSD) can lead to a better balance. Not too much. 100 is recommended.
(OSD * 100) Total PG =-Pool size
For example, the cluster has 9 OSD, and the default pool size is 3. Therefore, PG is.
9 * Total 100PG =-= 300 31.2 create pool1.2.1 create using command
Create a new pool named kube with 100 groups
Ceph osd pool create kube 150
Syntax:
Ceph osd pool create {pool-name} {pg-num} {pool-name}-name of the pool. It must be unique. {pg-num}-Total number of placement groups for the pool.
View the creation result
Ceph osd lspools1 device_health_metrics2 kube1.2.2 is created using web
Slightly
1.3 Associate pool to Application ceph osd pool application enable kube rbd
Add:
-Ceph Filesystem-$sudo ceph osd pool application enable cephfs--- Ceph Block Device-$sudo ceph osd pool application enable rbd--- Ceph Object Gateway-$sudo ceph osd pool application enable rgw1.4 pool for RBD requires initialization of rbd pool init kube
Add:
/ / to disable the application, use: ceph osd pool application disable {--yes-i-really-mean-it} / / to get I / O information for a specific pool or all pools ceph osd pool stats [{pool-name}] / / delete a pool, execute: ceph osd pool delete {pool-name} [{pool-name}-- yes-i-really-really-mean-it] 2. Deploy Ceph Provisioner2.1 on Kubernetes to create the resource file cat > external-storage-rbd-provisioner.yaml