Kubernetes v1.25: Pod Security Becomes the New Norm
The release of Kubernetes v1.25 marks a significant milestone for pod security controls: the Pod …
Kubernetes v1.25 introduces a significant new feature: support for user namespaces. This functionality allows for secure workloads in Kubernetes by restricting each pod to a limited set of available UIDs and GIDs on the system. This adds an additional layer of security to protect pods running on the same system.
With the new support for user namespaces, developers and DevOps teams can deploy more secure applications. Each pod runs in its own environment with unique IDs, reducing the risk of security incidents. In particular, it becomes possible to run workloads as root without compromising the host. This isolation is especially valuable in multi-tenant environments where different teams or applications operate on the same cluster.
Imagine running an application that needs to operate as a root user. With user namespaces, you can map the root ID within the pod to a non-zero ID outside the container. This means the application within the container believes it is running as root, while from the host’s perspective, it operates with a regular, unprivileged ID. This ensures the application has the necessary permissions without endangering host security.
Currently, you need to enable support for user namespaces as it is disabled by default. To do this, set hostUsers to false in the pod specification:
apiVersion: v1
kind: Pod
spec:
hostUsers: false
containers:
- name: nginx
image: docker.io/nginxNote that this feature is behind a feature gate. Enable the gate UserNamespacesStatelessPodsSupport before using the new feature. Additionally, the runtime environment must support user namespaces:
cri-dockerd is currently not planned.If you want to learn more about user namespaces or get involved with the community, you can reach SIG Node through various channels:
You can also contact us directly:
With the support of ayedo as an experienced Kubernetes partner, you are well-equipped to leverage the new capabilities of Kubernetes v1.25 and make your applications more secure.
Source: Kubernetes Blog
The release of Kubernetes v1.25 marks a significant milestone for pod security controls: the Pod …
The PodSecurityPolicy (PSP) was removed with Kubernetes v1.25. This decision was previously …
Kubernetes might initially seem like a purely developer-centric topic—complex, technical, and far …