9 Commits

Author SHA1 Message Date
Rodrigo Campos
ce73e1b3e9 docs: Run userns example in /tmp
This simplifies the permissions. If it's run on the home, some distros
make the /home/user dir with just permissions for the owner, but we
need +x permissions for others (technically for host user the container
is mapped to, but that is more tricky in this example).

/tmp has the right permissions already, so let's just do the example
there.

While we are there, I just copied the two commands from the runc doc, to
create the rootfs, instead of linking there. Also, I changed the
config.json to include the right path, now that is known.

Having the path fixed makes sure users can't do a mistake when setting
it. This was the cause of #11575 (they were not setting the rootfs as an
absolute path, as documented).

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2025-04-24 12:53:47 +02:00
Rodrigo Campos
882b1903cc docs: Fix typo in userns example
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2025-04-24 12:53:47 +02:00
Rodrigo Campos
b62339f399 docs: Fix typos to run userns with ctr
While we are there, bash should not be the process, it should be sh. In
the bare-bone image used in the example, bash is not present (or not
present anymore?).

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2025-04-24 12:53:47 +02:00
Akihiro Suda
9ca6fd9e6e Merge pull request #9117 from kinvolk/rata/userns-chown-opt-in
Require opt-in for rootfs chown when idmap mounts is not supported
2023-09-28 02:34:41 +09:00
Rodrigo Campos
f1070c4e18 docs/userns: Clarify requirements for k8s 1.25/1.26
crun 1.4.3 as well as runc 1.1 both support to open bind-mounts before
dropping privileges, as they are inaccessible after switching to the
user namespace. So that is the minimum version to use with containerd
1.7.

Also, since containerd 2.0 we use idmap mounts for files mounted in the
container created by containerd (like etc/hostname, etc/hosts, etc.), so
in that case we require newer OCI runtimes too. However, as the kubelet
doesn't request idmap mounts for kube volumes, we can lower the kernel
version.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-22 15:52:38 +02:00
Rodrigo Campos
46d3094aa3 docs/userns: Fix small typo
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-19 16:37:40 +02:00
Rodrigo Campos
d008d64a8f docs/userns: Clarify containerd 1.7 limitations
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-19 16:37:40 +02:00
Rodrigo Campos
e379082000 docs/userns: Document the need to opt-in for a slow chown
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-19 16:37:40 +02:00
Rodrigo Campos
967313049f doc: Add documentation about CRI user namespaces
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-13 23:37:47 +02:00