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
  1. Use the pod-overrides attribute to add the required annotations defined in Configuring fuse-overlayfs to the workspace. The pod-overrides attribute allows merging certain fields in the workspace pod’s spec.

    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=merge

    For 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
  1. Start the workspace and verify that /dev/fuse is available in the workspace container:

    $ stat /dev/fuse