Microk8s storage configuration

Asking for help? Comment out what you need so we can get more information to help you!

Cluster information:

Kubernetes version: 1.16.3
Cloud being used: edis.at
Installation method: microk8s
Host OS: ubuntu 18.04
CNI and version:
CRI and version:

The documentation is not clear on how I can configure the storage path.

I enabled the storage with microk8s.enable storage, and by default it uses /var/snap/microk8s/common/default-storage. I would like to change it to /data/, for example, because my root is small (10G). How can I change the pv-volume to be used by the internal registry (microk8s.enable registry)?

I looked around to see how you can override SNAP_COMMON env variable on a per-snap basis, but all the recommendations I found suggested you simply bind mount onto the /var/snap/microk8s/common/default-storage/ path

I take that to mean that you could completely shutdown/disable microk8s, save any data that’s currently in /var/snap/microk8s/common/default-storage/ , then mount your larger partition onto /var/snap/microk8s/common/default-storage/ and restore the previously saved data (if any)

Note that you cannot symlink /var/snap/microk8s/common/default-storage/ to another location, you must use a mount.