Courseiva
KCSA
Kubernetes Security FundamentalsmediumMultiple ChoiceObjective-mapped

KCSA Kubernetes Security Fundamentals Practice Question

A security auditor notices that a deployment running in the 'production' namespace is violating the Restricted Pod Security Standard because containers are running as root. How can you enforce compliance using Pod Security Admission?

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

Label the 'production' namespace with 'pod-security.kubernetes.io/enforce=restricted'.

Applying the 'pod-security.kubernetes.io/enforce: restricted' label to the namespace enforces the restricted Pod Security Standard for all newly created pods.

Answer analysis

Option-by-option breakdown

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

  • Label the 'production' namespace with 'pod-security.kubernetes.io/enforce=restricted'.

    Why this is correct

    Namespace labels are the correct mechanism to configure the Pod Security Admission controller to enforce standards.

  • Create a NetworkPolicy that blocks root user communication.

    Why it's wrong here

    NetworkPolicies control network traffic, not user IDs or process execution contexts.

  • Enable the SecurityContextDeny legacy admission controller.

    Why it's wrong here

    SecurityContextDeny is deprecated/removed and replaced by Pod Security Standards and Admission.

  • Update the kube-apiserver flags to globally block non-restricted pods without namespace labels.

    Why it's wrong here

    Pod Security Admission is configured primarily via namespace labels rather than global API server flags alone.

About these practice questions

This KCSA question is part of Courseiva's 320-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 and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed August 2026 · checked against the official CNCF / Linux Foundation exam blueprint

This KCSA practice question is part of Courseiva's free CNCF / Linux Foundation 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 KCSA exam.