Rook Ceph CSI

Rook is an open source cloud-native storage orchestrator, providing the platform, framework, and support for a diverse set of storage solutions to natively integrate with cloud-native environments.

Rook turns storage software into self-managing, self-scaling, and self-healing storage services. It does this by automating deployment, bootstrapping, configuration, provisioning, scaling, upgrading, migration, disaster recovery, monitoring, and resource management. Rook uses the facilities provided by the underlying cloud-native container management, scheduling and orchestration platform to perform its duties.

Rook integrates deeply into cloud native environments leveraging extension points and providing a seamless experience for scheduling, lifecycle management, resource management, security, monitoring, and user experience.

The full Rook documentation can be found here: https://rook.io/docs/rook/v1.5/ceph-quickstart.html the Rook project status can be found here: project status

Minimum Requirements

For Rook with Ceph as the storage provider to install and operate each Kubernetes node must meet the following requirements:

Cluster Access & Github

To install Rook your client machine needs to be able to clone the Rook GitHub repository and have Kubectl installed with connectivity to the cluster.

Nodes

For a production deployment it is recommended to have at least 3 Kubernetes worker nodes within the cluster.

Storage Devices

One of the following storage options must be available:

  1. Raw devices (no partitions or formatted filesystems)
  2. Raw partitions (no formatted filesystem)
  3. PVs available from a storage class in block mode

OS LVM package

Rook Ceph OSDs have a dependency on LVM OS package in the following scenarios:

  • OSDs are created on raw devices or partitions
  • If encryption is enabled (encryptedDevice: true in the cluster CR)
  • A metadata device is specified

To install LVM run the OS specific command below:

Ubuntu
CentOS
Copy

Minimal Installation

Rook can be installed on a single node cluster or a single master and single worker cluster to provide storage for application deployments. Please note this configuration is not recommended for production workloads. Using the "Rook Ceph Test" configuration a small cluster can be configured with minimal physical storage and less that 3 nodes, follow the steps below to configure Rook for a minimal installation.

Requirements:

  • Each node in the cluster requires a mounted unformatted volume, and LVM must be installed.
  • Allow workloads on Masters: Enabled
  • CNI: Calico

Step 1 - Install LVM

To avoid any issues in setting up Ceph on raw devices install LVM by running the command below

Ubuntu
CentOS
Copy

Step 2 - Clone Rook Github Repo

On your client machine clone the Rook Github repository into an empty directory using the command below.

Bash
Copy

This guide is using Rook release 1.5, you can find the latest release here: https://github.com/rook/rook/tree/master

Git Clone Output

Bash
Copy

Step 3 - Install Rook

Installing Rook is a two step process, first the CRDs and Operator are installed and then the Rook Ceph Cluster is created.

To install the CRDs and Operator run the command below:

Bash
Copy

CRD and Operator Example Output.

Bash
Copy

Once the Operator and CRDs have been installed the cluster can be created by running the command below:

Bash
Copy

Example Output

Bash
Copy

Step 4 - Cluster Status

To validate the installation run the command below;

Bash
Copy

The following output will be displayed:

Bash
Copy

Storage Class

To use Rook a storage class can be created in the cluster. To create a storage class for a minimal installation use the storageclass-test.yamlfound in the Rook Github repository rook/cluster/examples/kubernetes/ceph/csi/rbd

Example Storage Class for a minimal installation

Bash
Copy
storageclass-test.yaml
Copy

Known Error Failed to pull image

If LVM is not installed you may encounter the following error

Failed to pull image "rook/ceph:v1.5.9": rpc error: code = Unknown desc = Error response from daemon: manifest for rook/ceph:v1.5.9 not found: manifest unknown: manifest unknown

Resolution

To resolve this issue install LVM on each node and then restart the server.

How to Diagnose

Bash
Copy

Then run describe pod to view the pod events

Bash
Copy

The Events section will document the likely cause of the issue.

Bash
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard