Notice
This document is for a development version of Ceph.
Deploying Ceph-CSI
There are several ways to deploy the Ceph-CSI drivers into a Kubernetes cluster. The Ceph-CSI-Operator is the recommended method for new deployments. Helm charts and raw manifests remain available but are gradually being phased out in favor of the operator, and Rook deployments get Ceph-CSI automatically.
Note
If you deploy Ceph with Rook, Rook installs and manages Ceph-CSI for you. Current Rook releases do this through the Ceph-CSI-Operator. Do not deploy Ceph-CSI by hand in a Rook cluster.
Gather Ceph Cluster Information
Whichever method you choose, the drivers need to know how to reach the
Ceph cluster. Collect the cluster fsid and the Monitor addresses:
ceph mon dump
The Monitor addresses are listed in the driver’s cluster connection
configuration. The clusterID parameter that StorageClasses use to
select a cluster must match the name of the corresponding
ClientProfile resource when deploying with the operator. Helm and
raw manifest deployments conventionally use the cluster fsid as
the clusterID. Each back end page in this chapter describes the
CephX user that the drivers authenticate with.
Ceph-CSI-Operator (Recommended)
The Ceph-CSI-Operator manages the deployment, configuration, and lifecycle of Ceph-CSI drivers through Kubernetes custom resources. For complete documentation, see the Ceph-CSI Operator documentation. To install the operator:
kubectl create -f https://raw.githubusercontent.com/ceph/ceph-csi-operator/main/deploy/all-in-one/install.yaml
Then deploy a driver by creating a Driver resource. For example, to
deploy the RBD driver:
apiVersion: csi.ceph.io/v1
kind: Driver
metadata:
name: rbd.csi.ceph.com
namespace: ceph-csi-operator-system
The CephFS, NFS, and NVMe-oF drivers are deployed the same way, using
the names cephfs.csi.ceph.com, nfs.csi.ceph.com, and
nvmeof.csi.ceph.com. Connection details for the Ceph cluster are
supplied through the operator’s CephConnection and
ClientProfile resources; CephX credentials are stored in
Kubernetes Secrets referenced from the StorageClass. See the
operator quick start and operator installation guide pages for
complete walkthroughs, supported Kubernetes versions, and Helm-based
installation of the operator itself.
Helm Charts (Deprecated)
Note
For new deployments, the Ceph-CSI-Operator is recommended over Helm charts. See the Ceph-CSI Operator documentation for details.
The Ceph-CSI project publishes per-driver Helm charts:
helm repo add ceph-csi https://ceph.github.io/csi-charts
helm install --namespace ceph-csi-rbd ceph-csi-rbd ceph-csi/ceph-csi-rbd \
--create-namespace
A ceph-csi-cephfs chart is available for the CephFS driver. Chart
values are documented in the Ceph-CSI charts directory.
Raw Manifests (Deprecated)
Note
For new deployments, the Ceph-CSI-Operator is recommended over Raw Manifests. See the Ceph-CSI Operator documentation for details.
Per-driver Kubernetes manifests are maintained in the deploy/
directory of the Ceph-CSI repository, together with deployment
instructions in the Ceph-CSI documentation. This method offers the
most control but requires you to track and apply manifest changes on
every upgrade.
Brought to you by the Ceph Foundation
The Ceph Documentation is a community resource funded and hosted by the non-profit Ceph Foundation. If you would like to support this and our other efforts, please consider joining now.