Ceph storage
Many workloads that you may want to run on your Kubernetes cluster will require some
form of available storage. This guide will help you deploy Charmed Kubernetes with
Ceph container storage support. Available storage backends include ceph-xfs
,
ceph-ext4
, and cephfs
.
Deploying Ceph and Charmed Kubernetes
In this section, we’ll create a small Ceph cluster along with a basic Charmed Kubernetes environment that includes Ceph CSI support.
Deploy Ceph
Start by deploying three Ceph monitor nodes:
...and then add three storage nodes. For the storage nodes, we will specify additional
deployment parameters by using the --storage
flag:
The storage nodes above will have two 32GB devices for storage and 8GB for journaling. As we have asked for 3 machines, this means a total of 192GB of storage and 24GB of journal space. The storage comes from whatever the default storage class is for the cloud (e.g., on AWS this will be EBS volumes).
Deploy Charmed Kubernetes with Ceph CSI
Ceph CSI creates various Kubernetes resources, including pods. Therefore it requires the
kubernetes-control-plane
application to run in privileged mode. Create a suitable environment as follows:
Now add the relevant Ceph integrations:
Verify things are working
Check the Charmed Kubernetes cluster to verify Ceph cluster resources are available. Running:
...should return output similar to:
If you have installed Helm, you can then add a chart to verify the persistent volume is automatically created for you:
...which should return output similar to:
Warning: Removal
When the ceph-csi
charm is removed, it will not clean up Ceph pools that were created
when the relation with ceph-mon:client
was joined. If you wish to remove ceph pools,
use the delete-pool
action on a ceph-mon
unit.
Conclusion
Now you have a Ceph cluster integrated with your Charmed Kubernetes cluster. From here you can install any of the things that require storage out of the box.
See the guide to contributing or discuss these docs in our public Mattermost channel.