Skip to content
DevOps

Kubernetes v1.37: Rootless Mode Graduates to Beta

Kubernetes v1.37 promotes rootless mode to beta, enhancing security by running node components as non-root users.

Topic
DevOps
Reading time
4 min
Length
912 words
Published
Sep 6, 2026
10:53 am IST
In this article
  1. Why Rootless Mode Matters
  2. Use Cases for Rootless Mode
  3. Transition from Alpha to Beta
  4. Setting Up Rootless Mode
  5. What to Do on Monday
  6. Limitations and Considerations

In the latest Kubernetes v1.37 release, the KubeletInUserNamespace feature, also known as rootless mode, has progressed to beta. This development allows node components such as kubelet, CRI and OCI runtimes, CNI plugins, and kube-proxy to operate as non-root users within a Linux user namespace. The aim here is to boost security by containing potential vulnerabilities within a non-root user account.

Why Rootless Mode Matters

Node components have historically been vulnerable to container-breakout exploits that could lead to unauthorized root access. We've seen this with CVE-2022-0811, where CRI-O could be tricked into setting arbitrary sysctls, CVE-2023-27561, involving runc bypassing masked paths due to a volume mount race, and CVE-2024-10220, where kubelet could execute arbitrary commands as root. Running these components in a user namespace limits such vulnerabilities, preventing attackers from modifying critical system components like the kernel or firmware.

Remember, though, rootless mode doesn't tackle kernel vulnerabilities. Pair user namespaces with traditional hardening measures, like seccomp, to keep containers from invoking unnecessary system calls. This layered approach offers a more complete security stance.

Use Cases for Rootless Mode

Rootless mode is beneficial in various scenarios:

  • Production Clusters: Mitigate potential container-breakout vulnerabilities by confining the impact to a non-root environment.
  • Shared Machines: Users can deploy Kubernetes without root privileges, reducing the risk of affecting other users' environments and providing greater flexibility in shared computing environments.
  • Laptops: Prevent local clusters from disrupting host system configurations, such as VPN-specific iptables rules, ensuring personal computing environments remain stable.
  • AI Sandbox: Developers can create a dedicated local user account to run an AI coding agent and test Kubernetes clusters, safeguarding the host from malicious data and offering a controlled environment for AI experimentation.
  • Kubernetes-in-Kubernetes: Nested clusters can run as user-namespaced pods, offering isolation beyond Kubernetes API namespaces, allowing for complex multi-cluster setups without full privileges.
  • Bootstrapping: Use temporary unprivileged clusters to bootstrap actual clusters, e.g., with Cluster API, facilitating initial setup without administrative overhead.

Transition from Alpha to Beta

The transition to beta involves several key changes:

  • The KubeletInUserNamespace feature gate is enabled by default, though existing clusters remain unaffected unless explicitly configured for rootless operation. This default setting simplifies the adoption process for new deployments.
  • kubectl get nodes -o yaml now indicates whether nodes operate in a user namespace through the runningInUserNamespace property. This aids in cluster administration by allowing administrators to make informed decisions about workload scheduling and node management.
  • Kubernetes' CI/CD testing now includes rootless cluster conformance tests, ensuring robust evaluation and validation of the feature in diverse scenarios.

There are additional improvements that support this feature, such as idmapped tmpfs in Linux kernel v6.3, providing more flexible filesystem operations, and writable cgroups in containerd v2.1, allowing for better resource management. These advancements enable Kubernetes clusters with KubeletInUserNamespace to function within Kubernetes pods with hostUsers: false, enhancing the compatibility and usability of nested clusters.

Setting Up Rootless Mode

You need to establish the user namespace outside Kubernetes to implement rootless mode. Tools like Rootless Docker can help here. Here's a quick guide:

# Example using Docker

dockerd-rootless-setuptool.sh install
kind create cluster

For those using minikube, a similar approach applies:

minikube start --driver=docker

Usernetes offers a distribution of rootless Kubernetes, supporting multiple nodes and VXLAN connectivity via the Flannel CNI plugin. It's a more complex setup for those needing multi-node configurations. Meanwhile, k3s provides rootless mode without relying on external runtimes like Docker, making it a lightweight and streamlined option for resource-constrained environments.

What to Do on Monday

As an engineer, think about evaluating your current Kubernetes deployment to see if rootless mode can enhance your security posture. Here are steps you might take:

  • Review Security Requirements: Determine if your clusters could benefit from the additional isolation provided by rootless mode, especially if you handle sensitive workloads or operate in environments with stringent security policies.
  • Test in a Non-Production Environment: Experiment with rootless mode using a tool like kind or minikube to understand the implications and changes needed. This testing phase helps identify potential issues and develop mitigation strategies before full-scale deployment.
  • Monitor Compatibility: Check compatibility with your current CNI and CSI drivers, as some may not function optimally in a rootless environment. This step is crucial to ensure that existing infrastructure components continue to operate smoothly.
  • Stay Updated: Follow any updates or feedback from the Kubernetes community regarding rootless mode to anticipate future changes or enhancements, ensuring your deployments remain aligned with best practices and emerging standards.

Limitations and Considerations

Rootless mode comes with some caveats. It might not fully replace traditional security measures and could introduce compatibility issues with certain drivers. Moreover, the need to set up user namespaces outside Kubernetes may not be feasible for all users, particularly those with limited administrative access or in environments with strict IT policies.

Rootless mode should be part of a broader security strategy rather than a standalone solution. Regularly assess your security posture and incorporate traditional hardening techniques where necessary. This holistic approach ensures that security measures are comprehensive and effective across all layers of the infrastructure.

The promotion of rootless mode to beta in Kubernetes v1.37 marks a significant step in enhancing cluster security. By enabling node components to run as non-root users, Kubernetes reduces the risk of severe vulnerabilities. As with any new feature, careful testing and consideration of existing infrastructure and security requirements are crucial.

For those interested in exploring more Kubernetes enhancements, checking out DRA extended resource support and AWS hybrid cloud orchestration can offer additional insights into optimizing your Kubernetes setup.

Sources

Kubernetes v1.37: KubeletInUserNamespace (aka Rootless mode) Graduates to Beta

Every claim above was checked against this source before publishing. The analysis, the code and the opinions are mine.

Frequently asked

What is Kubernetes rootless mode?

Rootless mode allows Kubernetes node components to run as non-root users within a Linux user namespace, enhancing security by limiting potential vulnerabilities to a non-root account.

How does rootless mode improve security?

Rootless mode confines potential vulnerabilities to a non-root user's account, preventing attackers from gaining full root access to the host and altering critical system components.

Can rootless mode replace traditional security measures?

No, rootless mode should complement traditional security measures like seccomp, as it does not address kernel vulnerabilities.

What tools support Kubernetes rootless mode?

Tools like kind, minikube, Usernetes, and k3s support rootless mode, each with unique features and configurations for running Kubernetes clusters without root privileges.

Deepak Kumar

Written by

Deepak Kumar

Sr Software Engineer at India Today Group | Aaj Tak · MERN Stack · Generative AI

I build production web applications and Generative AI systems — React and Next.js on the front, Node.js and RAG pipelines behind them. I write here about what those systems actually do once real traffic hits them.

Message me