CertKeen

Certified Kubernetes Application Developer (CKAD) · Free practice question 3 of 12

fsGroup for shared volume ownership

Containers at Lanhydrock Studio run as UID 1001 and must write to a mounted volume whose files are owned by root. The storage driver supports ownership management. Which Pod-level setting makes the volume group-writable for the containers?

  1. A.securityContext: {seLinuxOptions: {level: s0}}
  2. B.securityContext: {runAsGroup: 0}
  3. C.securityContext: {fsGroup: 2000}
  4. D.securityContext: {supplementalGroups: [0], readOnlyRootFilesystem: true}
Show answer and explanation

Correct answer: C. securityContext: {fsGroup: 2000}

Why: fsGroup makes the kubelet change group ownership of supported volumes to that GID, set group write permissions, and add the GID to the container processes, so non-root containers can write. Running with group 0 grants root-group access but does not change volume ownership. readOnlyRootFilesystem is a container field and makes things less writable, and SELinux levels do not alter POSIX ownership.

More free Certified Kubernetes Application Developer (CKAD) questions