Courseiva

CKAD Practice Question: Application Environment, Configuration and Security

Which three security contexts can be set at the pod level (as opposed to container level)? (Select THREE.)

⚠ Common exam trap

Many exam-takers confuse Pod-level and container-level security contexts, often selecting `capabilities` or `readOnlyRootFilesystem` because they are commonly used, but they are only valid at the container level in the Kubernetes API.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

fsGroup

B is correct because `fsGroup` is a Pod-level security context field that applies a supplemental group ID to all containers in the Pod, ensuring that volumes mounted with that group ownership are accessible. It is set under `spec.securityContext.fsGroup`, not at the container level, making it a Pod-scoped setting.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    readOnlyRootFilesystem

    Why it's wrong here

    readOnlyRootFilesystem is a container-level securityContext field, not a pod-level one. It controls whether the container's root filesystem is mounted as read-only, which is a per-container filesystem property. Attempting to set this at the pod level is invalid because the pod securityContext does not define this field; it must be specified individually for each container, often paired with an emptyDir volume for writable scratch space.

  • ✓

    fsGroup

    Why this is correct

    fsGroup is a pod-level securityContext field that specifies the group ID for volume ownership. When set, Kubernetes changes the group ownership of volumes mounted into the pod (except Secrets and ConfigMaps) to that GID, and files created in those volumes will also inherit this group. This ensures containers have consistent group-based access to shared volumes, even when runAsGroup differs, because fsGroup applies at the mount layer.

  • ✓

    runAsGroup

    Why this is correct

    runAsGroup is a pod-level securityContext field that sets the primary group ID for all processes in all containers in the pod. It overrides any group specified in the container image and works in conjunction with runAsUser to determine effective credentials. While it can also be set at the container level, a pod-level value provides a default that applies to every container unless individually overridden.

  • ✗

    capabilities

    Why it's wrong here

    capabilities are a container-level securityContext setting, not a pod-level one. This field allows adding or dropping specific Linux capabilities (such as NET_ADMIN or SYS_TIME) for a single container's processes. The pod-level securityContext does not include a capabilities field because capabilities are inherently tied to individual process execution contexts, so they must be configured per container in the container's securityContext.

  • ✓

    runAsUser

    Why this is correct

    runAsUser is a pod-level securityContext field that specifies the numeric user ID under which all containers in the pod execute. It overrides any user defined in the container image and is fundamental for non-root execution. A container-level runAsUser can override this pod-level default, allowing per-container exceptions, but the pod-level setting ensures a consistent security baseline across the entire pod.

About these practice questions

This CKAD question is part of Courseiva's 826-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This CKAD practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CKAD exam.