Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions content/en/docs/concepts/workloads/pods/user-namespaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ min-kubernetes-server-version: v1.25
---

<!-- overview -->
{{< feature-state for_k8s_version="v1.30" state="beta" >}}
{{< feature-state for_k8s_version="v1.36" state="stable" >}}

This page explains how user namespaces are used in Kubernetes pods. A user
namespace isolates the user running inside the container from the one
Expand Down Expand Up @@ -52,13 +52,6 @@ user namespaces. The following OCI runtimes offer support:
* [crun](https://github.com/containers/crun) version 1.9 or greater (it's recommend version 1.13+).
* [runc](https://github.com/opencontainers/runc) version 1.2 or greater

{{< note >}}
Some OCI runtimes do not include the support needed for using user namespaces in
Linux pods. If you use a managed Kubernetes, or have downloaded it from packages
and set it up, it's possible that nodes in your cluster use a runtime that doesn't
include this support.
{{< /note >}}

To use user namespaces with Kubernetes, you also need to use a CRI
{{< glossary_tooltip text="container runtime" term_id="container-runtime" >}}
to use this feature with Kubernetes pods:
Expand Down Expand Up @@ -243,8 +236,6 @@ In Kubernetes prior to v1.33, the ID count for each of Pods was hard-coded to

## Integration with Pod security admission checks

{{< feature-state state="alpha" for_k8s_version="v1.29" >}}

For Linux Pods that enable user namespaces, Kubernetes relaxes the application of
[Pod Security Standards](/docs/concepts/security/pod-security-standards) in a controlled way.

Expand All @@ -253,7 +244,7 @@ namespaces, the following fields won't be constrained even in contexts that enfo
_Baseline_ or _Restricted_ pod security standard. This behavior does not
present a security concern because `root` inside a Pod with user namespaces
actually refers to the user inside the container, that is never mapped to a
privileged user on the host. Here's the list of fields that are **not** checks for Pods in those
privileged user on the host. Here's the list of fields that are **not** checked for Pods in those
circumstances:

- `spec.securityContext.runAsNonRoot`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ stages:
- stage: beta
defaultValue: true
fromVersion: "1.33"
- stage: stable
locked: true
defaultValue: true
fromVersion: "1.36"

---
Enable user namespace support for Pods.
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,6 @@ this is true when user namespaces are used.
* The node OS needs to be Linux
* You need to exec commands in the host
* You need to be able to exec into pods
* You need to enable the `UserNamespacesSupport`
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/)

{{< note >}}
The feature gate to enable user namespaces was previously named
`UserNamespacesStatelessPodsSupport`, when only stateless pods were supported.
Only Kubernetes v1.25 through to v1.27 recognise `UserNamespacesStatelessPodsSupport`.
{{</ note >}}

The cluster that you're using **must** include at least one node that meets the
[requirements](/docs/concepts/workloads/pods/user-namespaces/#before-you-begin)
Expand Down