Addon: OpenEBS

From MicroK8s version: 1.21+
Supported arch: amd64

OpenEBS, is the most widely deployed and easy to use open-source storage solution for Kubernetes. can be enabled with:

microk8s enable openebs

The addon includes the following StorageClass

  • openebs-hostpath and
  • openebs-jiva-default

The openebs-hostpath is recommended when using on a laptop or a single node cluster. Use openebs-jiva-default StorageClass for multi-node cluster.

Note: Using openebs-jiva-default requires to have 3 replicas.

Using OpenEBS is as easy as creating a PersistentVolumeClaim.

As an example:

kind: PersistentVolumeClaim
apiVersion: v1
  name: local-hostpath-pvc
  storageClassName: openebs-hostpath
    - ReadWriteOnce
      storage: 5G

To disable openebs,

microk8s disable openebs
microk8s disable openebs:force

What do you mean by 3 replicas? 3 nodes?

Yes some components of openebs runs as daemonset. Which provides HA. But you can always create a new StorageClass with 1 replica using the jiva storage.

More information here Jiva User Guide ·

But if you are running on your laptop or single node, i usually use the localpv.

I am planning to use it in microk8s cluster but failed to add node to cluster. Everything worked well until i tried to add node to a cluster. Not sure if i did something wrong or microk8s cluster is not production-ready yet. Looking for alternative software to microk8s.

Thanks @Jaanus for using MicroK8s. Sorry for the experience you’re having. If it is possible, would you be able to provide a bit more details on what happened when u add a node?