Skip to content

Provide RunAsGroup feature for Containers in a Pod #213

@krmayankk

Description

@krmayankk

Feature Description

As a Kubernetes User, i should be able to specify both user id and group id for the containers running inside a pod on a per Container basis, similar to how docker allows that using docker run options -u, --user="" Username or UID (format: <name|uid>[:<group|gid>]) format. Currently kubernetes only allows us to control the primary user id and allows us to add supplemental groups. There is no way to control the primary group id of the running container which is always 0(root).
This feature would enable enterprises to run containers as non root(non zero uid and non zero gid) and hence improve the level of security for the running containers. More discussion and agreement was gathered in this issue 22179

List of Work Items:-

  • RunAsGroup Implementation
  • Add feature flag , mark it alpha and disable by default
  • PSP Implementation for RunAsGroup
  • Verify e2e and Unit test Coverage
  • Verify Containerd and cri-o Test coverage

Containerd and Cri-o Implementation PR's

Test Results for CRI-O PR with latest Kubernetes Master
https://k8s-testgrid.appspot.com/sig-node-cri-o#crio-e2e-fedora

Test Coverage for CRI-O and containerd tests running as part of critest

Metadata

Metadata

Labels

kind/api-changeCategorizes issue or PR as related to adding, removing, or otherwise changing an APIkind/featureCategorizes issue or PR as related to a new feature.lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.sig/nodeCategorizes an issue or PR as relevant to SIG Node.stage/stableDenotes an issue tracking an enhancement targeted for Stable/GA status

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions