···8787 boot.kernelModules = [ "rbd" ];
8888```
89899090-## ZFS Snapshot Support
9090+## ZFS ContainerD Support
91919292-K3s's builtin containerd does not support the zfs snapshotter. However, it is possible to configure it to use an external containerd:
9292+The [ZFS snapshotter](https://github.com/containerd/zfs) can be enabled for k3s' embedded ContainerD though it requires mounting a dataset to a specific path used by k3s: `/var/lib/rancher/k3s/agent/containerd/io.containerd.snapshotter.v1.zfs`
9393+9494+For example:
93959696+```bash
9797+$ zfs create -o mountpoint=/var/lib/rancher/k3s/agent/containerd/io.containerd.snapshotter.v1.zfs <zpool name>/containerd
9498```
9595-virtualisation.containerd = {
9696- enable = true;
9797- settings =
9898- let
9999- fullCNIPlugins = pkgs.buildEnv {
100100- name = "full-cni";
101101- paths = with pkgs;[
102102- cni-plugins
103103- cni-plugin-flannel
104104- ];
105105- };
106106- in {
107107- plugins."io.containerd.grpc.v1.cri".cni = {
108108- bin_dir = "${fullCNIPlugins}/bin";
109109- conf_dir = "/var/lib/rancher/k3s/agent/etc/cni/net.d/";
110110- };
111111- # Optionally set private registry credentials here instead of using /etc/rancher/k3s/registries.yaml
112112- # plugins."io.containerd.grpc.v1.cri".registry.configs."registry.example.com".auth = {
113113- # username = "";
114114- # password = "";
115115- # };
116116- };
117117-};
118118-# TODO describe how to enable zfs snapshotter in containerd
119119-services.k3s.extraFlags = toString [
120120- "--container-runtime-endpoint unix:///run/containerd/containerd.sock"
121121-];
9999+100100+You can now configure k3s to use zfs by passing the `--snapshotter` flag.
101101+102102+```
103103+services.k3s = {
104104+ ...
105105+ extraFlags = [
106106+ "--snapshotter=zfs"
107107+ ];
122108```