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
containerd
needs to be told to use thezfs
snapshotter:zfs
dataset inside LXDThis approach will probably require the LXD container to run privileged & require the
zfs
modules passed through to the container.With
k0s
it is also useful during the configuration above socontainerd
is found to add to yourbash
profile:export PATH=$PATH:/var/lib/k0s/bin
Alternative Approach (unprivileged LXD)
Adding an
ext4
zvol to the container forcontainerd
will 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/containerd
running on LXD withzfs
:/var/lib/kubelet
seems to mount itself underzfs
ok onk3s version v1.22.7+k3s1
Using rootless overlayfs for the snapshotter works now on Ubuntu 22.04 thanks to this patch. It uses less space (
639MB
versus1.9GB
) & gives better performance than the native snapshotter.