| in blog | Kubernetes Blog |
|---|---|
| published date | 2026-09-04 |
| original entry | Kubernetes v1.37: KubeletInUserNamespace (aka Rootless mode) Graduates to Beta |
Kubernetes v1.37 promotes the KubeletInUserNamespace feature gate to beta.
With this feature enabled, all of the node components (kubelet, CRI and OCI runtimes,
CNI plugins, and kube-proxy) can run as a non-root user on the host, using a
Linux user namespace.
This technique is also known as rootless mode.
The work started as an experiment in 2018, and was merged into Kubernetes v1.22 (2021)
as an alpha feature (Kubernetes Enhancement Proposal KEP-2033).
This feature should not be confused with user namespaces for pods
(hostUsers: false with the UserNamespacesSupport feature gate, GA since v1.36),
which puts pods in user namespaces but still runs the node components as root.
These two features do not conflict.
Moreover, they can be combined to nest Kubernetes inside Kubernetes without resorting to
the full privileged: true.
Because the node components have historically had container-breakout vulnerabilities that could compromise full root privileges on the host.
Examples of such vulnerabilities include:
kernel.core_pattern, resulting in arbitrary code execution as root on the hostgitRepo volumes
(gitRepo volumes had a similar vulnerability,
CVE-2018-11235, back in 2018 too)/proc/sysrq-trigger and
/proc/sys/kernel/core_patternBy running the node components in a user namespace, the potential damage is confined to the non-root user's account. Notably, an attacker cannot conceal their intrusion by modifying the kernel, the boot loader, or the firmware.
It should still be noted that user namespaces are not effective for mitigating vulnerabilities in the kernel itself. User namespaces should be used in conjunction with traditional hardening measures such as seccomp to prevent containers from invoking unnecessary system calls.
hostUsers: false), isolating workloads more strictly than Kubernetes API namespaces do.A Linux kernel user namespace maps a host level non-root user (e.g., UID 1000) to a fake root user inside the namespace. The UID 0 privileges are limited to the inside of the namespace. The fake root is enough for most of the node components' tasks: mounting volumes, creating cgroups, and configuring the network namespaces of pods. It still comes with some caveats that may break compatibility with specific CNI and CSI drivers, though.
The user namespace has to be created outside of Kubernetes. For example, Rootless Docker can be used to prepare the user namespace in which Kubernetes runs.
The KubeletInUserNamespace feature gate itself is quite "boring": basically it just lets the kubelet
ignore permission errors that occur when setting some sysctl values
(e.g., vm.overcommit_memory and kernel.panic)
and when watching kernel messages via /dev/kmsg.
See Running Kubernetes Node Components as a Non-root User for further information.
KubeletInUserNamespace feature gate is now enabled by default.
Enabling the gate does not put the kubelet into a user namespace automatically, so nothing
changes for existing "rootful" clusters.kubectl get nodes -o yaml now reports whether nodes are running in a user namespace via
the runningInUserNamespace property.
A cluster administrator can use this property to set node labels or taints, to avoid scheduling workloads
that need real root privileges (e.g., some CNI plugin installers) onto rootless nodes.Several related improvements have also happened outside the promotion of the feature gate itself:
UserNamespacesSupport feature gate
by default, allowing user-namespaced pods (hostUsers: false) to be created without extra configuration.With these improvements, a Kubernetes cluster with KubeletInUserNamespace can now also be nested
inside Kubernetes pods with hostUsers: false (UserNamespacesSupport).
The easiest way is to use kind (a Kubernetes SIG Testing project) to run a Kubernetes cluster in rootless Docker, rootless nerdctl, or rootless Podman:
# Example using Docker
dockerd-rootless-setuptool.sh install
kind create cluster
Depending on the host configuration, you may need additional configuration for systemd, kernel modules, sysctl, etc.
See the Docker documentation and the kind documentation for further information.
minikube (a Kubernetes SIG Cluster Lifecycle project) also supports running a Kubernetes cluster in rootless Docker or rootless Podman:
dockerd-rootless-setuptool.sh install
minikube start --driver=docker
See the minikube documentation for further information.
Usernetes (a third-party project)
is a distribution of rootless Kubernetes, maintained by the author of this article.
The project began in 2018, and it is where the KubeletInUserNamespace feature gate
originally came from.
Unlike kind and minikube, Usernetes supports creating a cluster with multiple rootless Docker / Podman / nerdctl nodes, connected using VXLAN via the Flannel CNI plugin.
Usernetes also experimentally supports a Kubernetes-in-Kubernetes mode.
k3s (a CNCF Sandbox project) also supports rootless mode. Unlike kind, minikube, and the current generation of Usernetes, rootless k3s does not rely on an external runtime such as rootless Docker.
Depending on feedback and adoption, the Kubernetes project plans to graduate this feature to General Availability (GA) in a future release. If you have feedback on this feature, please open an issue in the kubernetes/kubernetes repository.
The project is also discussing several Kubernetes Enhancement Proposals that may contribute to simplifying Kubernetes-in-Kubernetes with this feature:
We always welcome new contributors. If you would like to get involved, you can join the Node Special Interest Group (SIG Node).
If you would like to share feedback, you can do so on our public Slack channel (visit https://slack.k8s.io/ for an invitation if you need one).
Special thanks to everyone who helped design and implement this feature, including but not limited to (in alphabetical order):