In the kubernetes documentation for running kubelet in user namespace, https://kubernetes.io/docs/tasks/administer-cluster/kubelet-in-userns/, one of the requirements is:
At least, the following directories need to be writable in the namespace (not outside the namespace):
/etc
How can this be achieved in a user namespace?
CodePudding user response:
The part of the documentation right above where you quoted explains that:
After unsharing the user namespace, you will also have to unshare other namespaces such as mount namespace.
You do not need to call
chroot()
norpivot_root()
after unsharing the mount namespace, however, you have to mount writable filesystems on several directories in the namespace.