I'm trying to get K0s working in LXC (LXD) containers on Ubuntu 20.04 using ZFS and I've managed to get past the apparmor challenges (for now at least) but stuck on overlayfs issues during the install phase.
kernel: [1617529.987422] overlayfs: filesystem on '/var/lib/k0s/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/6371/fs' not supported as upperdir
Has anyone hit on this issues before and has a solution/workaround?
Regards, Matt
containerdneeds to be told to use thezfssnapshotter:zfsdataset inside LXDThis approach will probably require the LXD container to run privileged & require the
zfsmodules passed through to the container.With
k0sit is also useful during the configuration above socontainerdis found to add to yourbashprofile:export PATH=$PATH:/var/lib/k0s/binAlternative Approach (unprivileged LXD)
Adding an
ext4zvol to the container forcontainerdwill probably be less problematic & is better from a security perspective as the container can run unprivileged. This approach works withk3s&/var/lib/rancher/k3s/agent/containerdrunning on LXD withzfs:/var/lib/kubeletseems to mount itself underzfsok onk3s version v1.22.7+k3s1Using rootless overlayfs for the snapshotter works now on Ubuntu 22.04 thanks to this patch. It uses less space (
639MBversus1.9GB) & gives better performance than the native snapshotter.