Kubernetes Blog
Follow
Kubernetes 1.31: Fine-grained SupplementalGroups control
Kubernetes 1.31 introduces fine-grained control over supplementary groups for container processes within Pods. The default behavior, where group memberships from the container image's /etc/group are implicitly merged, can lead to security concerns and unexpected behavior when accessing volumes.To address this, Kubernetes 1.31 introduces the supplementalGroupsPolicy field in Pod's security context. This field allows users to specify the policy for calculating supplementary groups, with two options:- Merge: Implicit group memberships from /etc/group are merged with groups specified in the Pod's manifest.
- Strict: Only specified groups in the manifest are considered, excluding implicit memberships.The Strict policy helps prevent the addition of implicit supplementary groups, enhancing security. Kubernetes also exposes the process identity of the first container process in the .status field, allowing users to verify the actual supplementary groups.To use this feature, Kubernetes v1.31 or later with the SupplementalGroupsPolicy feature gate enabled is required, along with a supported CRI runtime (containerd v2.0 or CRI-O v1.31). The feature is currently in alpha and is expected to be promoted to beta and general availability in future releases.Kubernetes SIG Node expects that this feature will improve security and make it easier to manage supplementary groups within Pods. Users can learn more about this feature in the provided documentation and get involved with the SIG Node community for feedback and discussion.