Local Persistent Volumes

I can’t seem to find in the documentation, or it’s not obious how to use Kubernetes Local Persistent Volumes with the Couchbase Operator. I’m not running Kubernetes in the cloud, and don’t really want to use Ceph etc for performance reasons. It would be great If I could figure out how to use Local Persistent Volumes.

Has anyone done this yet?

Hi Marcus,

Yes it can be done, but keep in mind it’s not supported. Also, local volumes cannot be dynamically created so you’ll have to manually create them.

First you’ll need to create a StorageClass with provisioner=local.
Next, associate PersistentVolumes with the storageClass by setting storageClassName= < name of storageclass > in the PersistntVolume spec. Once you’ve done this, the operator will be able to use your storageclass to ‘claim’ local volumes for your nodes.

  • (You will need to create a Volume for each VolumeMount specified in the couchbase spec. So if you have a 3 node cluster, with default and data mounts that’s 6 total Persistent volumes.)

We’ll be updating the docs to include this info as well. Thanks,

Great, thanks for this information!

@tommie , I do have a question though. Are there any requirements when naming the PersistentVolumes?