Skip to content

KCSA · Domain 1: Overview of Cloud Native Security · 14% of the exam

Task 1.2: Cloud Provider and Infrastructure Security

Securing the infrastructure under a cluster: control plane and node network access, the cloud metadata API, node hardening and the shared responsibility split with the provider.

Study it

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 company moves its workloads to a managed Kubernetes offering. A review finds that the cluster's API server answers on a public internet address, although every administrator works from the corporate network. What does the Kubernetes security checklist recommend?

  1. AKeep the public endpoint, since every request still needs authentication and authorization
  2. BRestrict external network access to the API server and reach it through a bastion host
  3. CPublish the API server on a high, unlisted port so that internet scanners do not find it
  4. DEnable audit logging so that every request that arrives from the internet is recorded
Show the answer and why
  • AKeep the public endpoint, since every request still needs authentication and authorization

    Incorrect

    The checklist treats public exposure of the API server as a finding in itself; it lists the API server among the endpoints that should not be exposed on the internet.

  • BRestrict external network access to the API server and reach it through a bastion host

    Correct

    The checklist says external internet access to the API server should be restricted, warns that many managed distributions expose it publicly by default, and suggests a bastion host for access.

  • CPublish the API server on a high, unlisted port so that internet scanners do not find it

    Incorrect

    Changing the port does not limit who can connect. The checklist asks for external access to be restricted, not hidden.

  • DEnable audit logging so that every request that arrives from the internet is recorded

    Incorrect

    Audit logging records requests after they arrive; it does not reduce the exposure that the checklist asks to remove.

The Network security section of the security checklist says the Kubernetes API, the kubelet API and etcd should not be exposed publicly, notes that many managed distributions publish the API server by default, and suggests a bastion host for administrative access.

Question 2 · choose 1

Secret volume mounts on Linux nodes are backed by tmpfs. In which node configuration can that Secret data still be written to persistent storage, according to the Kubernetes page on Linux node security?

  1. AThe node uses cgroup v2 instead of cgroup v1 for its container limits
  2. BThe Secret is mounted into more than one container of the Pod
  3. CThe Secret is larger than the node's page size
  4. DSwap is enabled and the kernel lacks noswap support (before 6.3)
Show the answer and why
  • AThe node uses cgroup v2 instead of cgroup v1 for its container limits

    Incorrect

    The page ties the risk to swap and the kernel's noswap support, not to the cgroup version.

  • BThe Secret is mounted into more than one container of the Pod

    Incorrect

    Mounting a Secret into several containers does not change where tmpfs data is kept.

  • CThe Secret is larger than the node's page size

    Incorrect

    Size does not move tmpfs data to disk; swapping does, on kernels without the noswap option.

  • DSwap is enabled and the kernel lacks noswap support (before 6.3)

    Correct

    The page warns that with swap and an older kernel (or an unsupported configuration), memory-backed volumes can be written to persistent storage, and recommends kernel 6.3 or later or a noswap backport.

Memory-backed volumes such as Secret mounts use tmpfs, which normally stays in memory. If swap is configured and the kernel cannot use the noswap option (supported from Linux 6.3), that memory can be swapped to disk, so the page recommends a recent kernel.

Question 3 · choose 1

The Kubernetes guide to securing a cluster recommends enabling audit logging. What does it say should happen to the audit file?

  1. AIt should be archived on a secure server
  2. BIt should be stored in a ConfigMap in kube-system
  3. CIt should be deleted after each API server restart
  4. DIt should be shared with every namespace owner
Show the answer and why
  • AIt should be archived on a secure server

    Correct

    The guide recommends enabling audit logging and archiving the audit file on a secure server.

  • BIt should be stored in a ConfigMap in kube-system

    Incorrect

    ConfigMaps hold non-confidential configuration; the guide asks for the file to be archived on a secure server.

  • CIt should be deleted after each API server restart

    Incorrect

    Deleting audit records would destroy the evidence they exist to keep.

  • DIt should be shared with every namespace owner

    Incorrect

    Spreading audit data widely exposes sensitive request details; the guide asks for the file to be archived on a secure server.

Among its recommendations for protecting a cluster from compromise, the guide to securing a cluster asks for audit logging to be turned on and for the audit file to be archived on a secure server, rather than kept in cluster objects or handed around.

Practice domain 1 →Practice all domains →