Describe the bug
When I create a PVC for a Pod with the following securityContext.
securityContext:
fsGroup: 1000
runAsUser: 1000
The pod is not running as a root container.
When we now login to the container and try to create a file inside the mounted volume we get the following issue.
bash-4.4$ ls -l /var/data/
total 4
drwxrwxrwx 2 nobody 4294967294 4096 Oct 12 10:09 kpi
bash-4.4$ ls -l /var/data/kpi/
total 0
bash-4.4$ id
uid=1000(appuser) gid=1000(appuser) groups=1000(appuser)
bash-4.4$ cd /var/data/kpi/
bash-4.4$ touch test
touch: cannot touch 'test': Permission denied
This is unfortunate.
When we now try to set the supplementalGroup to be gid 4294967294.
Kubernetes does not like to set that kind of thing.
Event 23m FailedCreate spec.securityContext.supplementalGroups[0]: Invalid value: 4294967294: must be between 0 and 2147483647
This is unfortunate and blocks us from creating rootless container environments.
For context that is what systemd.io says about gids -> https://systemd.io/UIDS-GIDS/
Describe the bug When I create a PVC for a Pod with the following securityContext.
The pod is not running as a root container. When we now login to the container and try to create a file inside the mounted volume we get the following issue.
This is unfortunate. When we now try to set the supplementalGroup to be gid
4294967294
.Kubernetes does not like to set that kind of thing.
This is unfortunate and blocks us from creating rootless container environments. For context that is what
systemd.io
says about gids -> https://systemd.io/UIDS-GIDS/Environment
To Reproduce Steps to reproduce the behavior:
Create a pod or Deployment with above security Context and mount an NFS volume to it. It wont be able to create files.