2020-03-09 18:27:11 -06:00
---
title : Prerequisites
---
2021-09-10 16:56:55 -06:00
Rook can be installed on any existing Kubernetes cluster as long as it meets the minimum version
and Rook is granted the required privileges (see below for more information).
2024-01-30 20:13:16 +05:30
## Kubernetes Version
2021-09-10 16:56:55 -06:00
2026-01-13 15:21:26 +05:30
Kubernetes versions **v1.30** through **v1.35** are supported.
2021-09-10 16:56:55 -06:00
2022-08-30 14:17:00 -06:00
## CPU Architecture
2022-05-23 14:22:53 +05:30
2022-07-31 01:48:47 -07:00
Architectures supported are `amd64 / x86_64` and `arm64` .
2022-05-23 14:22:53 +05:30
2021-09-10 16:56:55 -06:00
## Ceph Prerequisites
2020-04-01 15:21:03 -06:00
2023-04-26 17:20:11 -06:00
To configure the Ceph storage cluster, at least one of these local storage types is required:
2022-05-12 19:29:40 +02:00
* Raw devices (no partitions or formatted filesystems)
* Raw partitions (no formatted filesystem)
2022-09-15 06:28:24 +00:00
* LVM Logical Volumes (no formatted filesystem)
2022-09-09 15:09:47 -06:00
* Persistent Volumes available from a storage class in `block` mode
2020-04-01 15:21:03 -06:00
2023-04-26 17:20:11 -06:00
Confirm whether the partitions or devices are formatted with filesystems with the following command:
2021-09-10 16:56:55 -06:00
```console
2022-05-12 19:29:40 +02:00
$ lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
vda
└─vda1 LVM2_member >eSO50t-GkUV-YKTH-WsGq-hNJY-eKNf-3i07IB
├─ubuntu--vg-root ext4 c2366f76-6e21-4f10-a8f3-6776212e2fe4 /
└─ubuntu--vg-swap_1 swap 9492a3dc-ad75-47cd-9596-678e8cf17ff9 [SWAP]
vdb
2021-09-10 16:56:55 -06:00
```
2023-04-26 17:20:11 -06:00
If the `FSTYPE` field is not empty, there is a filesystem on top of the corresponding device. In this example, `vdb` is available to Rook, while `vda` and its partitions have a filesystem and are not available.
2021-09-10 16:56:55 -06:00
2020-03-09 18:27:11 -06:00
## LVM package
Ceph OSDs have a dependency on LVM in the following scenarios:
2022-05-12 19:29:40 +02:00
2022-05-26 08:10:06 +00:00
* If encryption is enabled (`encryptedDevice: "true"` in the cluster CR)
2022-05-12 19:29:40 +02:00
* A `metadata` device is specified
2023-10-25 12:02:45 +05:30
* `osdsPerDevice` is greater than 1
2020-03-09 18:27:11 -06:00
LVM is not required for OSDs in these scenarios:
2022-05-12 19:29:40 +02:00
2023-04-26 17:20:11 -06:00
* OSDs are created on raw devices or partitions
* OSDs are created on PVCs using the `storageClassDeviceSets`
2020-03-09 18:27:11 -06:00
2023-04-26 17:20:11 -06:00
If LVM is required, LVM needs to be available on the hosts where OSDs will be running.
Some Linux distributions do not ship with the `lvm2` package. This package is required on all storage nodes in the k8s cluster to run Ceph OSDs.
2020-03-09 18:27:11 -06:00
Without this package even though Rook will be able to successfully create the Ceph OSDs, when a node is rebooted the OSD pods
running on the restarted node will **fail to start** . Please install LVM using your Linux distribution's package manager. For example:
2022-05-12 19:29:40 +02:00
**CentOS** :
2020-03-09 18:27:11 -06:00
```console
sudo yum install -y lvm2
```
2022-05-12 19:29:40 +02:00
**Ubuntu** :
2020-03-09 18:27:11 -06:00
2020-03-18 08:49:49 +01:00
```console
2020-03-09 18:27:11 -06:00
sudo apt-get install -y lvm2
```
2022-05-12 19:29:40 +02:00
**RancherOS** :
2020-03-18 08:49:49 +01:00
2022-05-12 19:29:40 +02:00
* Since version [1.5.0 ](https://github.com/rancher/os/issues/2551 ) LVM is supported
* Logical volumes [will not be activated ](https://github.com/rook/rook/issues/5027 ) during the boot process. You need to add an [runcmd command ](https://rancher.com/docs/os/v1.x/en/installation/configuration/running-commands/ ) for that.
2020-03-18 08:49:49 +01:00
```yaml
runcmd :
2022-05-12 19:29:40 +02:00
- [ "vgchange" , "-ay" ]
2020-03-18 08:49:49 +01:00
```
2020-03-09 18:27:11 -06:00
## Kernel
### RBD
2022-07-31 01:48:47 -07:00
Ceph requires a Linux kernel built with the RBD module. Many Linux distributions
have this module, but not all.
2020-03-09 18:27:11 -06:00
For example, the GKE Container-Optimised OS (COS) does not have RBD.
2023-04-26 17:20:11 -06:00
Test your Kubernetes nodes by running `modprobe rbd` .
If the rbd module is 'not found', rebuild the kernel to include the `rbd` module,
install a newer kernel, or choose a different Linux distribution.
2022-07-31 01:48:47 -07:00
Rook's default RBD configuration specifies only the `layering` feature, for
broad compatibility with older kernels. If your Kubernetes nodes run a 5.4
2023-04-26 17:20:11 -06:00
or later kernel, additional feature flags can be enabled in the
storage class. The `fast-diff` and `object-map` features are especially useful.
2022-07-31 01:48:47 -07:00
```yaml
imageFeatures : layering,fast-diff,object-map,deep-flatten,exclusive-lock
```
2020-03-09 18:27:11 -06:00
### CephFS
2023-04-26 17:20:11 -06:00
If creating RWX volumes from a Ceph shared file system (CephFS), the recommended minimum kernel version is **4.17** .
If the kernel version is less than 4.17, the requested PVC sizes will not be enforced. Storage quotas will only be
2020-03-09 18:27:11 -06:00
enforced on newer kernels.
2022-09-26 08:58:19 +00:00
## Distro Notes
Specific configurations for some distributions.
### NixOS
2023-04-26 17:20:11 -06:00
For NixOS, the kernel modules will be found in the non-standard path `/run/current-system/kernel-modules/lib/modules/` ,
2022-09-26 08:58:19 +00:00
and they'll be symlinked inside the also non-standard path `/nix` .
2023-04-26 17:20:11 -06:00
Rook containers require read access to those locations to be able to load the required modules.
2022-09-26 08:58:19 +00:00
They have to be bind-mounted as volumes in the CephFS and RBD plugin pods.
2023-04-26 17:20:11 -06:00
If installing Rook with Helm, uncomment these example settings in `values.yaml` :
2022-09-26 08:58:19 +00:00
2022-12-14 08:52:04 +05:30
* `csi.csiCephFSPluginVolume`
* `csi.csiCephFSPluginVolumeMount`
* `csi.csiRBDPluginVolume`
* `csi.csiRBDPluginVolumeMount`
2022-09-26 08:58:19 +00:00
2023-04-26 17:20:11 -06:00
If deploying without Helm, add those same values to the settings in the `rook-ceph-operator-config`
ConfigMap found in operator.yaml:
2022-09-26 08:58:19 +00:00
2022-12-14 08:52:04 +05:30
* `CSI_CEPHFS_PLUGIN_VOLUME`
* `CSI_CEPHFS_PLUGIN_VOLUME_MOUNT`
* `CSI_RBD_PLUGIN_VOLUME`
* `CSI_RBD_PLUGIN_VOLUME_MOUNT`
2024-05-27 22:27:39 -04:00
If using containerd, remove `LimitNOFILE` from containerd service config to avoid issues like slow ceph commands or mons falling out of quorum.
```nix
systemd . services . containerd . serviceConfig = {
LimitNOFILE = lib . mkForce null ;
};
```