# Storage Classes

## Installed by default

MetaKube installs Storage Classes by default that are backed by cloud storage and work out of the box:

| Cloud Provider | Storage Class name | Provisioner |  |
| --- | --- | --- | --- |
| OpenStack | `sys11-ceph` | `cinder.csi.openstack.org` (CSI) | default except in DBL &amp; CBK regions |
| OpenStack | `sys11-quobyte-external-provisioner` | `cinder.csi.openstack.org` (CSI) | default in DBL &amp; CBK regions |
| AWS | `sys11-aws-ebs` (default) | `ebs.csi.aws.com` (CSI) |  |

## Changing the default StorageClass

To change which StorageClass is the default, just add the annotation:

```shell
kubectl annotate storageclass <storageclass name> storageclass.kubernetes.io/is-default-class=true
```

MetaKube will automatically remove the annotation from the managed StorageClass.

> [!WARNING]
>
> You can't change the storage class of an existing PV or migrate to a different volume type directly. However, you can migrate the data to a different cloud volume type and create new PVs. For more information see the [Migration guide](<https://documentation.syseleven.de/en/prior-docs/metakube-core/ceph-migration-guide/#migrate-existing-persistentvolumes>).

## Access Mode RWX (ReadWriteMany)

> [!WARNING]
>
> MetaKube Core currently does not support RWX volumes.
>
> We are evaluating options that will enable the use of RWX volumes. Follow our roadmap to receive updates.

## Use StorageClass

Kubernetes differentiates three options for `spec.storageClassName` in a PVC (or indirectly in a StatefulSets' `spec.persistentVolumeClaimTemplates`):

1. `null` or equivalent: not specifying the field at all

   Kube-apiserver will automatically populate the field with the name of the default StorageClass.

   > **Note**
   >
   > We recommend this option if possible, because it allows switching the default StorageClass without recreating a StatefulSet.
2. Name of a specific StorageClass

   Kubernetes will use the CSI driver of the StorageClass to provision a PV according to the PVC.
3. `""` (the empty string)

   This option is reserved for "manual" PV provisioning. Kubernetes will not dynamically create a PV and the PVC will be left in status `Pending` until a matching PV is created.
