NFS ID Mapping in Kubernetes
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 3.9k
- Forks
- 230
- Avg merge
- 7h 48m
- Merged PRs (30d)
- 3
Description
I am mounting an NFS volume in my Kubernetes container. If I use the default runtimeClass, it works as expected - The file ownership is mapped to the users in the container, ie:
drwxr-xr-x 2 admin admin 4096 Aug 28 12:50 ./
drwxr-xr-x 3 root root 4096 Aug 28 12:49 ../
-rw-r--r-- 1 admin admin 0 Aug 27 16:55 test2
-rw-r--r-- 1 admin admin 15 Aug 27 16:57 test3
-rw-r--r-- 1 admin admin 0 Aug 27 16:20 testfile
If I change only the runtimeClass to sysbox-runc, the file ownership is not mapped - Everything is owned by nobody:nogroup:
-rw-r--r-- 1 nobody nogroup 0 Aug 27 16:20 testfile
-rw-r--r-- 1 nobody nogroup 15 Aug 27 16:57 test3
-rw-r--r-- 1 nobody nogroup 0 Aug 27 16:55 test2
drwxr-xr-x 3 root root 4096 Aug 27 16:59 ..
drwxr-xr-x 2 nobody nogroup 4096 Aug 27 16:57 .
I'm running in GKE, and using the Ubuntu with containerd (ubuntu_containerd) node type as was suggested in the docs, the kernel is version 5.15.0-1061-gke and shiftfs appears to be installed. The documentation suggests that with this kernel version and shiftfs the ID mapping should work. Any ideas?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the NFS mount with the default runtimeClass and sysbox-runc on the stated GKE Ubuntu/containerd node, then inspect the runtime's shiftfs and ID-mapping behavior. Done means determining why ownership becomes nobody:nogroup and documenting or implementing a verified fix, with the result checked against the shown ownership output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- google-cloud, kubernetes, ubuntu
- Domain
- devops, infrastructure, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100