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: 2000Related terms
- securityContext — The part of a Kubernetes pod or container spec that sets security options such as user, capabilities, seccomp and read-only root filesystem.
- runAsNonRoot — A Kubernetes security setting that, when set to true, stops a container from starting if it would run as the root user.
- volume — Storage managed by Docker that lives outside any container, so data survives when the container is removed.
Taught in
- SecurityContexts And Capabilities — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Mock Exam: Sixteen Tasks Against The Clock — Certified Kubernetes Application Developer (CKAD) Exam Prep