KCSA · Domain 3: Kubernetes Security Fundamentals · 22% of the exam
Task 3.1: Pod Security Standards
The Privileged, Baseline and Restricted profiles and the controls each one forbids or requires.
Study it
Pod Security Standards and Pod Security Admission
Lesson coming
Sample questions
Try each one before opening the answer. Every option is explained, with the CNCF documentation page that proves it.
Question 1 · choose 1
A network diagnostics Pod adds the NET_RAW capability so that it can send ICMP packets, and otherwise keeps the container runtime's defaults. Its namespace has the label pod-security.kubernetes.io/enforce=baseline. The team expects it to pass, since NET_RAW belongs to the runtime's default capability set. What happens when the Pod is created?
AIt is admitted, because Baseline allows any capability in the runtime's default set
BIt is admitted with a warning, because enforce mode only warns for the Baseline level
CIt is rejected, because Baseline requires every container to drop ALL capabilities
DIt is rejected, as NET_RAW is not among the capabilities Baseline allows adding
Show the answer and why
AIt is admitted, because Baseline allows any capability in the runtime's default set
Incorrect
Baseline does not refer to the runtime's defaults; it checks capabilities.add against its own allowed list, which leaves NET_RAW out.
BIt is admitted with a warning, because enforce mode only warns for the Baseline level
Incorrect
The mode decides the action, not the level: enforce rejects violating Pods at any level, while warn only shows a warning.
CIt is rejected, because Baseline requires every container to drop ALL capabilities
Incorrect
Baseline has no requirement about which capabilities are dropped; it only limits what may be added.
DIt is rejected, as NET_RAW is not among the capabilities Baseline allows adding
Correct
Baseline allows adding only a fixed list of capabilities (AUDIT_WRITE, CHOWN, NET_BIND_SERVICE, SETUID and a few others). NET_RAW is not on it, so enforce mode rejects the Pod.
The Baseline profile restricts capabilities.add to an explicit list of allowed values, and NET_RAW is not among them, even though some runtimes grant it by default. With the enforce label set to baseline, the Pod is rejected at admission.
Under the Baseline Pod Security Standard, which values may a container use for securityContext.procMount?
AAny value, because Baseline checks procMount only for privileged containers
BOnly Unmasked, so that monitoring tools can read the whole /proc
COnly unset or Default, which keeps the default /proc masks
DNone, because only Restricted allows the procMount field to be set
Show the answer and why
AAny value, because Baseline checks procMount only for privileged containers
Incorrect
Baseline restricts procMount for every container, init container and ephemeral container, not only privileged ones.
BOnly Unmasked, so that monitoring tools can read the whole /proc
Incorrect
Unmasked removes the default /proc masks, which Baseline exists to keep in place.
COnly unset or Default, which keeps the default /proc masks
Correct
The standards say the default /proc masks reduce attack surface and should be required: the allowed values are undefined/nil and Default.
DNone, because only Restricted allows the procMount field to be set
Incorrect
Baseline allows the field when it is set to Default, and Restricted includes every Baseline control.
The Baseline profile's /proc Mount Type control keeps the default /proc masks, which hide parts of /proc to reduce the attack surface. A container may leave procMount unset or set it to Default; Restricted inherits the same rule.
For which kind of workloads is the Privileged Pod Security Standards profile intended?
AOrdinary application Pods that need no special access to the host or kernel
BUntrusted workloads from external customers
CBatch Jobs that run for less than an hour
DSystem and infrastructure workloads run by trusted, privileged users
Show the answer and why
AOrdinary application Pods that need no special access to the host or kernel
Incorrect
Ordinary applications fit Baseline or Restricted; Privileged removes all restrictions.
BUntrusted workloads from external customers
Incorrect
Untrusted workloads call for the most restrictive settings, not the unrestricted profile.
CBatch Jobs that run for less than an hour
Incorrect
The profiles are chosen by required privileges, not by how long a workload runs.
DSystem and infrastructure workloads run by trusted, privileged users
Correct
The standards describe Privileged as an unrestricted policy aimed at system- and infrastructure-level workloads managed by privileged, trusted users.
Privileged is the absence of restrictions. The standards reserve it for system and infrastructure components run by trusted administrators, while application workloads should use Baseline or Restricted.