Skip to content

KCSA · Domain 4: Kubernetes Threat Model · 16% of the exam

Task 4.3: Denial of Service

Resource exhaustion and its defenses: requests and limits, quotas, API priority and fairness, and limiting expensive requests.

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

In a multi-tenant cluster, a semi-trusted tenant's automation bug creates tens of thousands of ConfigMaps, and etcd runs short of memory. CPU and memory limits are already enforced for every Pod. Which control limits this kind of denial of service?

  1. AA ResourceQuota with requests.storage in the tenant's namespace
  2. BAn object count ResourceQuota, such as count/configmaps, in the namespace
  3. CA LimitRange in the tenant's namespace that caps the size of each ConfigMap
  4. DA ResourceQuota with requests.memory and limits.memory in the namespace
Show the answer and why
  • AA ResourceQuota with requests.storage in the tenant's namespace

    Incorrect

    requests.storage caps the storage requested by PersistentVolumeClaims; ConfigMaps are API objects stored in etcd and are not counted by it.

  • BAn object count ResourceQuota, such as count/configmaps, in the namespace

    Correct

    Object count quotas cap how many objects of a kind a namespace can hold; the RBAC good practices name resource quotas as the mitigation for denial of service through object creation.

  • CA LimitRange in the tenant's namespace that caps the size of each ConfigMap

    Incorrect

    A LimitRange constrains compute requests and limits of Pods and containers and storage requests of PersistentVolumeClaims; it neither sizes nor counts ConfigMaps.

  • DA ResourceQuota with requests.memory and limits.memory in the namespace

    Incorrect

    Compute quotas sum the memory requests and limits of the namespace's Pods; the memory etcd uses to hold ConfigMaps is not counted.

Users who may create objects can exhaust etcd through the size or number of objects, which the RBAC good practices list as a denial of service risk. Object count quotas (count/<resource>) in a ResourceQuota cap how many objects of each kind a namespace can hold, while storage and compute quotas cover only claims and Pods, and LimitRanges constrain Pods, containers and claims.

Question 2 · choose 1

Why does the Kubernetes security checklist ask for memory and CPU limits on workloads?

  1. ATo make the scheduler place the Pod on the fastest node
  2. BTo encrypt the Pod's memory at run time with the node's hardware keys
  3. CTo let the Pod use more than its request without restriction
  4. DTo stop a breached workload from exhausting the node's resources
Show the answer and why
  • ATo make the scheduler place the Pod on the fastest node

    Incorrect

    Limits cap consumption; scheduling uses requests, and speed is not the checklist's reason.

  • BTo encrypt the Pod's memory at run time with the node's hardware keys

    Incorrect

    Resource limits have nothing to do with memory encryption.

  • CTo let the Pod use more than its request without restriction

    Incorrect

    A limit does the opposite: it caps how much the Pod can use.

  • DTo stop a breached workload from exhausting the node's resources

    Correct

    The checklist says memory and CPU limits restrict what a Pod can consume on a node, preventing potential DoS attacks from malicious or breached workloads.

Without limits, one compromised or runaway workload can starve everything else on its node. The checklist asks for memory and CPU limits, which an admission controller can enforce, as a defense against such denial of service.

Question 3 · choose 1

What does the kubelet do when a node runs low on resources such as memory or disk, according to the node-pressure eviction documentation?

  1. AIt adds more memory to the node from the cloud provider
  2. BIt pauses the API server until resources recover
  3. CIt proactively terminates Pods to reclaim resources
  4. DIt migrates running containers to another node live
Show the answer and why
  • AIt adds more memory to the node from the cloud provider

    Incorrect

    The kubelet cannot add capacity; it reclaims resources by evicting Pods.

  • BIt pauses the API server until resources recover

    Incorrect

    The kubelet acts on its own node; it does not pause the control plane.

  • CIt proactively terminates Pods to reclaim resources

    Correct

    Node-pressure eviction is the process in which the kubelet proactively terminates Pods to reclaim resources on the node.

  • DIt migrates running containers to another node live

    Incorrect

    Kubernetes does not live-migrate containers; evicted Pods are replaced by their controllers.

When memory, disk or PIDs on a node fall below eviction thresholds, the kubelet evicts Pods to protect the node. This limits the damage a resource-hungry workload can do, though it is a recovery mechanism rather than a limit on each workload.

Practice domain 4 →Practice all domains →