fsGroup
fsGroup is a security context option in Kubernetes that allows you to specify a supplementary group ID that will own a volume. When a pod is scheduled to a node and it has an fsGroup defined in its security context, Kubernetes will perform a chown operation on the volume before the pod starts. This ensures that all files within the volume are owned by the specified fsGroup.
The primary purpose of fsGroup is to manage access control for volumes, especially when multiple pods need
When fsGroup is used, all processes within the pod will run with the specified group ID as
It's important to note that fsGroup operates at the volume level. If a pod mounts multiple volumes,