Access /dev/fuse in workspace containers
Enable access to /dev/fuse in workspace containers to use fuse-overlayfs as a storage driver for Podman.
Prerequisites
-
For Kubernetes versions older than 4.15: you have administrator-enabled access to
/dev/fuse. See Configuring fuse-overlayfs. -
You have identified a workspace to use with fuse-overlayfs.
Procedure
-
Use the
pod-overridesattribute to add the required annotations defined in Configuring fuse-overlayfs to the workspace. Thepod-overridesattribute allows merging certain fields in the workspace pod’sspec.For Kubernetes versions older than 4.15:
$ kubectl patch devworkspace <DevWorkspace_name> \ --patch '{"spec":{"template":{"attributes":{"pod-overrides":{"metadata":{"annotations":{"io.kubernetes.cri-o.Devices":"/dev/fuse","io.openshift.podman-fuse":""}}}}}}}' \ --type=mergeFor Kubernetes version 4.15 and later:
$ kubectl patch devworkspace <DevWorkspace_name> \ --patch '{"spec":{"template":{"attributes":{"pod-overrides":{"metadata":{"annotations":{"io.kubernetes.cri-o.Devices":"/dev/fuse"}}}}}}}' \ --type=merge
Verification
-
Start the workspace and verify that
/dev/fuseis available in the workspace container:$ stat /dev/fuse
Next steps