Question 920 of 997
System HardeninghardMultiple SelectObjective-mapped

Kubernetes Node Hardening Best Practices: Non-Root, Drop Caps, Read-Only FS

This CKS practice question tests your understanding of system hardening. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Which THREE of the following are best practices for reducing the attack surface of a Kubernetes node?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "best"

    Why it matters: Signals that multiple options may be partially correct. Choose the option that most directly solves the exact problem described, not the one that sounds most complete.

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

Run containers with non-root user and drop all capabilities

Running containers with a non-root user (via `securityContext.runAsNonRoot: true` or `runAsUser`) and dropping all capabilities (via `securityContext.capabilities.drop: ['ALL']`) enforces the principle of least privilege. This prevents attackers who compromise the container from gaining root privileges or using kernel capabilities like `CAP_SYS_ADMIN` to escape the container, directly reducing the node's attack surface.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

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

  • Run containers with non-root user and drop all capabilities

    Why this is correct

    Least privilege principle reduces potential damage.

    Clue confirmation

    The clue word "best" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Install all available security patches and packages

    Why it's wrong here

    Installing unnecessary packages increases attack surface.

  • Disable unnecessary system services like Bluetooth and ModemManager

    Why this is correct

    Reduces the attack surface by removing unneeded services.

    Clue confirmation

    The clue word "best" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Remove SSH access from all nodes

    Why it's wrong here

    SSH may be needed for emergency access; better to restrict and audit.

  • Use read-only root filesystem for containers where possible

    Why this is correct

    Prevents writes to the root filesystem, limiting impact of compromise.

    Clue confirmation

    The clue word "best" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

Common exam traps

Common exam trap: answer the scenario, not the keyword

A common misconception is that completely removing SSH access from nodes is a valid hardening step. However, the correct approach is to restrict SSH access (e.g., disable root login, use SSH keys, limit to specific IPs) rather than eliminating it, as SSH is often needed for emergency node access.

Detailed technical explanation

How to think about this question

Under the hood, containers share the host kernel, so a root user inside a container (UID 0) is mapped to the host's root by default, allowing privilege escalation via `--privileged` or capabilities. Dropping all capabilities removes over 40 kernel capabilities (e.g., `CAP_NET_RAW`, `CAP_SYS_PTRACE`), while a read-only root filesystem (option E) prevents writes to the container's filesystem, thwarting malware persistence and tampering with binaries. In practice, combining these with a seccomp profile and AppArmor/SELinux further hardens the node.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A junior network technician can log in to a core router but cannot reach the enable prompt or configuration mode. The AAA server is authenticating the login — but the authorisation policy only grants privilege level 1, not 15. Authentication (who you are) is working; authorisation (what you can do) is not.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related CKS practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free CKS practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this CKS question test?

System Hardening — This question tests System Hardening — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Run containers with non-root user and drop all capabilities — Running containers with a non-root user (via `securityContext.runAsNonRoot: true` or `runAsUser`) and dropping all capabilities (via `securityContext.capabilities.drop: ['ALL']`) enforces the principle of least privilege. This prevents attackers who compromise the container from gaining root privileges or using kernel capabilities like `CAP_SYS_ADMIN` to escape the container, directly reducing the node's attack surface.

What should I do if I get this CKS question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Are there clue words in this question I should notice?

Yes — watch for: "best". Signals that multiple options may be partially correct. Choose the option that most directly solves the exact problem described, not the one that sounds most complete.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

5 more ways this is tested on CKS

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. Which THREE of the following are best practices for reducing the attack surface of Kubernetes nodes?

medium
  • A.Minimize host access from containers (e.g., disable hostPID, hostNetwork)
  • B.Use minimal base container images
  • C.Disable unnecessary system services on nodes
  • D.Expose the host network to containers for better performance
  • E.Run containers as root to simplify permissions

Why A: Option A is correct because disabling hostPID and hostNetwork prevents containers from accessing the host's process namespace and network stack, which would otherwise allow privilege escalation or network sniffing. This aligns with the principle of least privilege and reduces the node's attack surface by isolating container workloads from the host OS.

Variation 2. Which THREE of the following are best practices for reducing the attack surface of Kubernetes nodes? (Select three.)

hard
  • A.Use read-only root filesystems for containers where possible
  • B.Allow privileged containers for debugging
  • C.Disable unnecessary system services on nodes
  • D.Run containers as root to simplify management
  • E.Minimize host access from containers (avoid hostPID, hostNetwork, hostIPC)

Why A: Option A is correct because using a read-only root filesystem for containers (e.g., setting `readOnlyRootFilesystem: true` in the container's security context) prevents attackers from writing malicious binaries or modifying system files inside the container, even if they gain code execution. This reduces the attack surface by limiting the container's ability to persist changes or escalate privileges through file system manipulation.

Variation 3. Which of the following is NOT a recommended method to reduce the attack surface on Kubernetes nodes?

medium
  • A.Using read-only root filesystems
  • B.Running containers as non-root
  • C.Running containers with privileged: true
  • D.Disabling unnecessary system services on nodes

Why C: Option C is correct because setting `privileged: true` in a container's security context grants it elevated capabilities equivalent to running as root on the host, including access to all kernel namespaces and devices. This directly increases the attack surface by allowing the container to perform host-level operations, such as loading kernel modules or modifying network settings, which violates the principle of least privilege. The CKS exam emphasizes that privileged containers should be avoided unless absolutely necessary, and they are never a recommended method for reducing the attack surface.

Variation 4. Which TWO of the following are valid ways to reduce the attack surface of a Kubernetes node? (Select 2)

medium
  • A.Load all kernel modules to support any workload
  • B.Restrict hostNetwork, hostPID, and hostIPC access from containers
  • C.Enable SSH access for all users for troubleshooting
  • D.Disable unnecessary system services on the node
  • E.Allow containers to run as root

Why B: Restricting hostNetwork, hostPID, and hostIPC access from containers is a valid way to reduce the attack surface of a Kubernetes node because it prevents containers from breaking out of their namespace isolation. When a container uses hostNetwork, it shares the node's network stack, potentially allowing it to sniff traffic or bind to privileged ports. Similarly, hostPID and hostIPC grant access to the host's process table and inter-process communication mechanisms, which can be leveraged for privilege escalation or information disclosure. By default, these should be disabled unless absolutely necessary, as they directly expose host-level resources to the container.

Variation 5. Which THREE of the following are recommended measures to reduce the attack surface of Kubernetes nodes?

hard
  • A.Disable unnecessary system services on nodes
  • B.Minimize host access from containers (avoid hostPID, hostNetwork, hostIPC)
  • C.Open all ports on nodes to allow easy debugging
  • D.Run all containers as root user
  • E.Apply Pod Security Standards to enforce least privilege

Why A: Option A is correct because disabling unnecessary system services on Kubernetes nodes reduces the number of running processes and open ports that could be exploited by an attacker. Services like telnet, rsh, or unused SNMP daemons provide additional attack vectors. This aligns with the principle of minimalism in system hardening, as recommended by the CIS Kubernetes Benchmark.

Keep practising

More CKS practice questions

Last reviewed: Jul 4, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This CKS 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 CKS exam.