SaveMyCert
Log in
5 of 5 free questions left today·for 10 a day
KCSA · Domain 3

Kubernetes Security Fundamentals practice questions

Kubernetes Security Fundamentals is worth 22% of the KCSA exam — the heaviest of the 6 domains. The built-in Kubernetes security controls: Pod Security Standards and Pod Security Admission, authentication, Secrets, isolation and segmentation, audit logging and network policy. Official weighting 22%. 6 fully worked examples are further down this page, answers included.

Exam weight
22%
the heaviest of the 6 domains
Questions
87
across 3 topics
Free, no account
5/day
a free account allows 10 a day
Explanations
Every option
right and wrong

Build a practice session

5 free questions left today.

Domains

How many?

5 free questions left today.

Mode

Ready when you are

10 fresh questions drawn across 1 of 6 domains, in Learn mode.

Review what you missed

Every question you answer incorrectly, and every question you flag while practising, is saved here automatically. Finish a session and you can come back to re-drill just those.

6 sample Kubernetes Security Fundamentals questions, fully explained

Questions from the KCSA bank mapped to domain 3, with the answer key and the reasoning behind every option. None of them repeat the examples on the main KCSA practice page.

Question 1Kubernetes Security Fundamentals

A platform team runs node agents managed by trusted administrators that need host networking and privileged containers in namespace node-agents, and security-critical customer applications in namespace payments. Which profile assignment matches the intended audience of each profile?

Choose one.

  • a
    node-agents: Baseline; payments: Restricted

    Baseline disallows host networking and privileged containers, so the node agents would be rejected.

  • b
    node-agents: Privileged; payments: Baseline

    Baseline targets developers of non-critical applications; security-critical workloads are the stated audience of Restricted.

  • c
    node-agents: Baseline; payments: Baseline

    Baseline would block the node agents and under-protect the security-critical payments workloads.

  • d
    node-agents: Privileged; payments: Restricted Correct

    Privileged is intended for system and infrastructure workloads run by trusted users, and Restricted for security-critical applications.

The concept

Each Pod Security Standards profile has a stated audience: Privileged for trusted infrastructure, Baseline for common non-critical applications, Restricted for security-critical or lower-trust workloads.

Why that’s the answer

The node agents need host networking and privileged containers, which only Privileged allows, and they are run by trusted administrators, which is exactly its audience. The payments applications are security-critical, the audience Kubernetes names for Restricted. Baseline is a near-miss for both: too strict for the agents, not strict enough for payments.

How to reason it out
  1. List what each workload needs or is: host access for the agents, security-critical for payments.
  2. Recall that Baseline forbids host namespaces and privileged containers.
  3. Assign Privileged to the agents and Restricted to payments.

Exam tip: Give infrastructure that truly needs host access its own Privileged namespace; hold sensitive apps to Restricted.

KCSA Pod Security Standards and Pod Security Admission — the lesson that teaches this.

Question 2Kubernetes Security Fundamentals

A namespace enforces the Baseline profile. Which setting in a Pod spec causes the Pod to be rejected?

Choose one.

  • a
    runAsUser: 0

    Baseline does not restrict the user ID; requiring a non-root user is a Restricted control.

  • b
    allowPrivilegeEscalation: true

    Baseline leaves this field alone; requiring it to be false is part of Restricted.

  • c
    hostNetwork: true Correct

    Baseline disallows sharing the host's network, PID or IPC namespaces; only an unset or false value is allowed.

  • d
    seccompProfile omitted

    Baseline only forbids an explicit Unconfined profile; requiring an explicit seccomp profile is part of Restricted.

The concept

Baseline blocks settings that give a Pod known paths to the host, such as host namespaces, privileged mode and hostPath volumes.

Why that’s the answer

Host namespaces are one of Baseline's controls: spec.hostNetwork, hostPID and hostIPC must be unset or false. The other three settings are all checked only by the stricter Restricted profile, which is why they are tempting: they are real Pod Security Standards controls, just not Baseline ones.

How to reason it out
  1. Ask whether each setting gives the Pod direct access to the host.
  2. Recall that running as root, privilege escalation and explicit seccomp are Restricted checks.
  3. Pick host networking, which Baseline forbids.

Exam tip: Baseline stops host access; Restricted additionally demands non-root, no privilege escalation and explicit seccomp.

KCSA Pod Security Standards and Pod Security Admission — the lesson that teaches this.

Question 3Kubernetes Security Fundamentals

Under the Baseline profile of the Pod Security Standards, which volume type in a Pod spec is forbidden?

Choose one.

  • a
    emptyDir

    emptyDir is scratch space created for the Pod and is allowed even under Restricted.

  • b
    configMap

    configMap volumes are allowed under every profile, including Restricted.

  • c
    persistentVolumeClaim

    persistentVolumeClaim volumes are allowed under every profile, including Restricted.

  • d
    hostPath Correct

    Baseline forbids hostPath volumes because they expose the node's filesystem to the container.

The concept

A hostPath volume mounts a directory from the node into the container, which can expose host files and credentials.

Why that’s the answer

Baseline lists hostPath volumes as forbidden. emptyDir, configMap and persistentVolumeClaim are all on Restricted's allowed list of volume types, so they also pass Baseline.

How to reason it out
  1. Ask which volume reaches outside the Pod's own resources.
  2. Recall that hostPath mounts the node's filesystem.
  3. Pick hostPath.

Exam tip: No hostPath under Baseline or Restricted.

KCSA Pod Security Standards and Pod Security Admission — the lesson that teaches this.

Question 4Kubernetes Security Fundamentals

A developer adds a debugging sidecar container to a Pod in a namespace that enforces the Baseline profile. Which securityContext capabilities entry causes the Pod to be rejected?

Choose one.

  • a
    add: ["NET_BIND_SERVICE"]

    NET_BIND_SERVICE is in Baseline's allowed set; it is even the one capability Restricted lets a container add back.

  • b
    add: ["KILL"]

    KILL is part of the default capability set that Baseline allows a container to add.

  • c
    add: ["NET_ADMIN"] Correct

    NET_ADMIN is not in Baseline's allowed list, so adding it is a violation and the Pod is rejected.

  • d
    add: ["CHOWN"]

    CHOWN is part of the default capability set that Baseline allows a container to add.

The concept

Baseline allows a container to add only capabilities from the container runtime's usual default set (such as CHOWN, KILL, NET_BIND_SERVICE, SETUID); anything beyond it is disallowed.

Why that’s the answer

Baseline's capabilities control permits adding AUDIT_WRITE, CHOWN, DAC_OVERRIDE, FOWNER, FSETID, KILL, MKNOD, NET_BIND_SERVICE, SETFCAP, SETGID, SETPCAP, SETUID and SYS_CHROOT. NET_ADMIN, which allows changing network interfaces, routes and firewall rules, is outside that set. The other three are tempting because they sound powerful, but they are default capabilities.

How to reason it out
  1. Recall that Baseline permits only the default capability set.
  2. Check each capability against that set.
  3. Identify NET_ADMIN as the one outside it.

Exam tip: Baseline: only default capabilities may be added; Restricted: drop ALL, add back NET_BIND_SERVICE only.

KCSA Pod Security Standards and Pod Security Admission — the lesson that teaches this.

Question 5Kubernetes Security Fundamentals

Which container securityContext setting must be explicitly present for a Linux Pod to pass the Restricted profile?

Choose one.

  • a
    readOnlyRootFilesystem: true

    A read-only root filesystem is good hardening, but it is not one of the Pod Security Standards controls.

  • b
    privileged: false

    Privileged mode must not be true, but an unset value is also allowed, so the field need not be present.

  • c
    allowPrivilegeEscalation: false Correct

    Restricted accepts only false for this field, so it has to be set; leaving it unset fails the check.

  • d
    seLinuxOptions.type: container_t

    container_t is an allowed SELinux type, but no SELinux type has to be set; leaving seLinuxOptions unset also passes.

The concept

Restricted adds explicit requirements on top of Baseline, including allowPrivilegeEscalation: false, runAsNonRoot, dropping ALL capabilities and an explicit seccomp profile.

Why that’s the answer

For allowPrivilegeEscalation the only allowed value under Restricted is false, so a container that omits the field is rejected. privileged may be unset or false, so it does not have to appear. readOnlyRootFilesystem is a real securityContext field that neither profile checks, and an SELinux type is only restricted to an allowed list, never required.

How to reason it out
  1. Separate 'must not be true' fields (unset is fine) from 'must be set' fields.
  2. Recall that Restricted allows only false for allowPrivilegeEscalation.
  3. Exclude fields the standards do not check at all.

Exam tip: Under Restricted, set allowPrivilegeEscalation: false explicitly on every container.

KCSA Pod Security Standards and Pod Security Admission — the lesson that teaches this.

Question 6Kubernetes Security Fundamentals

A namespace enforces the Restricted profile. This Linux Pod is rejected:spec: securityContext: runAsNonRoot: true containers: - name: app image: registry.example.com/app:1.4 securityContext: allowPrivilegeEscalation: falseWhich changes are needed for it to be admitted? (Select TWO.)

Choose TWO.

  • a
    Set seccompProfile type RuntimeDefault in the Pod securityContext Correct

    Restricted requires the seccomp profile to be explicitly RuntimeDefault or Localhost; an absent profile fails.

  • b
    Set readOnlyRootFilesystem: true in the container securityContext

    Recommended hardening, but not a Pod Security Standards control, so it does not affect admission.

  • c
    Set privileged: false explicitly in the container securityContext

    An unset privileged field already passes; making it explicit changes nothing.

  • d
    Set capabilities drop: ["ALL"] in the container securityContext Correct

    Restricted requires every container to drop ALL capabilities (adding back only NET_BIND_SERVICE).

  • e
    Set fsGroup to a non-zero value in the Pod securityContext

    The standards do not check fsGroup, so adding it does not fix the violations.

The concept

Restricted requires runAsNonRoot, allowPrivilegeEscalation: false, an explicit RuntimeDefault or Localhost seccomp profile, and dropping ALL capabilities, plus Baseline's controls and limited volume types.

Why that’s the answer

The manifest already meets runAsNonRoot (set at Pod level, which covers the container) and allowPrivilegeEscalation: false. It is missing the two remaining Linux controls: an explicit seccomp profile and capabilities drop ALL. The distractors are real securityContext fields that the standards do not check, or a field whose unset value already passes.

How to reason it out
  1. List Restricted's container requirements.
  2. Tick off what the manifest already sets: runAsNonRoot and allowPrivilegeEscalation.
  3. Identify the missing ones: seccomp profile and drop ALL.
  4. Ignore hardening fields the standards do not check.

Exam tip: Restricted checklist: non-root, no privilege escalation, seccomp RuntimeDefault or Localhost, drop ALL.

KCSA Pod Security Standards and Pod Security Admission — the lesson that teaches this.

What KCSA domain 3 tests, topic by topic

The official exam guide breaks Kubernetes Security Fundamentals into 3 topics. The question bank follows the same split, so a weak topic shows up as a cluster of misses you can go back and read.

Published KCSA practice questions per topic in Kubernetes Security Fundamentals
TopicWhat it coversQuestions
Pod Security Standards and Pod Security AdmissionOfficial KCSA competencies (Kubernetes Security Fundamentals): Pod Security Standards; Pod Security Admissions. Scope: the Privileged, Baseline and Restricted profiles, the enforce, audit and warn modes, namespace labels and versions, exemptions, and migrating from the removed PodSecurityPolicy.29
Authentication, Secrets and audit loggingOfficial KCSA competencies (Kubernetes Security Fundamentals): Authentication; Secrets; Audit Logging. Scope: users, groups and service accounts, client certificates, tokens and OIDC, how authentication leads into RBAC authorization, Secret types and encryption at rest, and audit policies, levels and backends.29
Isolation, segmentation and network policyOfficial KCSA competencies (Kubernetes Security Fundamentals): Isolation and Segmentation; Network Policy. Scope: namespaces, node pools and multi-tenancy, resource quotas, NetworkPolicy ingress and egress rules, default-deny policies, selectors, and the CNI support NetworkPolicy needs.29
Total87

Revise Kubernetes Security Fundamentals before you drill it

Other KCSA domains

Kubernetes Security Fundamentals: your questions

Kubernetes Security Fundamentals is domain 3 of the KCSA exam guide and carries 22% of the scored content — the heaviest of the 6 domains. On a 60-question paper that works out to roughly 13 questions, though CNCF does not publish an exact per-domain count and individual exam forms vary.

Source

The domain weight and topic list on this page come from the official KCSA exam guide.