DEV Community

Cover image for MicroK8s: Setting up MicroCeph as storage
Sergio Peris
Sergio Peris

Posted on • Originally published at sertxu.dev

MicroK8s: Setting up MicroCeph as storage

We can configure MicroK8s to use Ceph as its storage. This tutorial assumes you already configured a MicroCeph cluster, if you don't check how to set it up on a single-node cluster or a multi-node cluster.

Connect MicroCeph to MicroK8s

To connect MicroCeph to our MicroK8s cluster, first we should enable the add-on.

sudo microk8s enable rook-ceph 
Enter fullscreen mode Exit fullscreen mode

Once it's enabled it will output the instructions about how to connect to an existing Ceph cluster.

As we are running MicroCeph on the same node, we can run the following command:

sudo microk8s connect-external-ceph 
Enter fullscreen mode Exit fullscreen mode

A few seconds later it will output the MicroK8s storage class that's ready to be used.

NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE ceph-rbd rook-ceph.rbd.csi.ceph.com Delete Immediate true 1s 
Enter fullscreen mode Exit fullscreen mode

Top comments (0)