Skip to content

KCSA · Domain 3: Kubernetes Security Fundamentals · 22% of the exam

Task 3.6: Isolation and Segmentation

Separating tenants and workloads with namespaces, RBAC, quotas, network policies and node isolation.

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

Tenant analytics shares a cluster with other tenants. In its namespace it runs long-lived API Pods and batch Pods that its job runner creates with spec.activeDeadlineSeconds set, so that they always end. Every container of both kinds sets CPU and memory requests and limits. The platform team wants the API Pods capped at 8 CPU cores of requests and the batch Pods at 32, enforced separately, and the job runner must keep creating its Pods in the same namespace. Which configuration does this?

  1. ATwo ResourceQuotas with requests.cpu, one with scope NotBestEffort for the API Pods and one with scope BestEffort for the batch Pods
  2. BOne ResourceQuota per workload whose scopeSelector matches the Pods' app label
  3. CTwo ResourceQuotas with requests.cpu, one with scope NotTerminating and one with scope Terminating
  4. DTwo LimitRanges in the namespace, one with a CPU maximum of 8 and one with a maximum of 32
Show the answer and why
  • ATwo ResourceQuotas with requests.cpu, one with scope NotBestEffort for the API Pods and one with scope BestEffort for the batch Pods

    Incorrect

    BestEffort matches only Pods of the best effort QoS class, which set no requests or limits; both kinds of Pods here are Burstable or Guaranteed, so all of them fall under NotBestEffort.

  • BOne ResourceQuota per workload whose scopeSelector matches the Pods' app label

    Incorrect

    A scopeSelector accepts only the documented scopes, such as Terminating, BestEffort or PriorityClass; a quota cannot select Pods by label.

  • CTwo ResourceQuotas with requests.cpu, one with scope NotTerminating and one with scope Terminating

    Correct

    NotTerminating tracks Pods whose activeDeadlineSeconds is unset and Terminating tracks Pods where it is set, so each quota caps one kind of workload in the same namespace.

  • DTwo LimitRanges in the namespace, one with a CPU maximum of 8 and one with a maximum of 32

    Incorrect

    A LimitRange constrains each Pod or container on its own, not the namespace total, and it applies to all Pods in the namespace rather than to one workload.

Resource quota scopes restrict which objects a quota tracks. Pods with spec.activeDeadlineSeconds set count under the Terminating scope and the others under NotTerminating, so two scoped quotas give the API and batch workloads separate CPU budgets without moving either to another namespace. BestEffort scopes follow the QoS class, which is the same for both kinds here, and LimitRanges bound single Pods or containers, not totals.

Question 2 · choose 1

Several tenants of a shared cluster request storage through one shared StorageClass. Which reclaim policy does the Kubernetes multi-tenancy guide recommend for it, and why?

  1. ARetain, so that each tenant's data survives for the next claimant
  2. BDelete, so that a PersistentVolume cannot be reused across namespaces
  3. CRecycle, so that volumes are scrubbed and handed to any namespace
  4. DAny policy, because PersistentVolumes are namespaced objects
Show the answer and why
  • ARetain, so that each tenant's data survives for the next claimant

    Incorrect

    Keeping volumes for later claims is exactly what lets one tenant's data reach another; the guide asks for Delete on shared classes.

  • BDelete, so that a PersistentVolume cannot be reused across namespaces

    Correct

    The guide says that if a StorageClass is shared, its reclaim policy should be Delete to ensure a PersistentVolume cannot be reused across different namespaces.

  • CRecycle, so that volumes are scrubbed and handed to any namespace

    Incorrect

    The guide recommends Delete for shared classes; handing used volumes to other namespaces is the risk it avoids.

  • DAny policy, because PersistentVolumes are namespaced objects

    Incorrect

    PersistentVolumes are cluster-wide resources with a lifecycle independent of namespaces; claims are namespaced.

PersistentVolumeClaims are namespaced, but PersistentVolumes are cluster-wide. For storage isolation the multi-tenancy guide suggests dynamic provisioning, a StorageClass per tenant where possible, and a Delete reclaim policy on any shared StorageClass so that volumes are not reused across namespaces.

Question 3 · choose 1

In the Kubernetes multi-tenancy guide, which object is the usual building block for isolating tenants in a shared cluster, scoping their RBAC roles, quotas and network policies?

  1. AThe Namespace
  2. BThe Node
  3. CThe ServiceAccount
  4. DThe StorageClass
Show the answer and why
  • AThe Namespace

    Correct

    The guide describes namespaces as the basis of control plane isolation, with policies such as RBAC, quotas and network policies applied per namespace.

  • BThe Node

    Incorrect

    Nodes can be dedicated to tenants, but RBAC roles and quotas are scoped by namespace.

  • CThe ServiceAccount

    Incorrect

    ServiceAccounts give workloads identities; they do not scope quotas or network policies.

  • DThe StorageClass

    Incorrect

    StorageClasses describe kinds of storage, not tenant boundaries.

Namespaces divide a cluster's API objects. The multi-tenancy guide builds tenant isolation on them: namespaced RBAC, resource quotas and network policies, optionally strengthened by node isolation.

Practice domain 3 →Practice all domains →