fsGroup

A pod-level security context field that sets the group which owns, and may write to, the pod's mounted volumes.

In more detail

When fsGroup is set, the kubelet changes the group of supported volumes to that number and adds it to every container's supplementary groups. It lets a container running as a non-root user write to a volume without running as root. It exists only at pod level, not in a container's security context.

Example

securityContext:
  runAsUser: 1000
  fsGroup: 2000

Related terms

Taught in

References

Certification courses