CertGrid CertGrid
Hands-on Lab·Kubernetes and Cloud Native Security Associate

ResourceQuota and LimitRange as Security Controls

Availability is part of security, and the cheapest denial of service in Kubernetes is a neighbour who asks for everything. A ResourceQuota stops that at admission - and has a side effect people usually meet by accident.

Security Fundamentals Guide 24 of 42 Intermediate

Written against the versions above. ResourceQuota is a built-in admission controller, enabled by default. The mandatory-requests behaviour is a documented consequence of quoting `requests.*`, not a bug.

The cka5001 cluster: one control plane and 3 schedulable workers, on Cilium.
Server NameIP AddressOSRolesCPURAMHDD
CKA5001192.168.0.41Ubuntu 26.04 LTSControl Plane Node (tainted NoSchedule)2 Core4 GB50 GB
CKA5001-NODE01192.168.0.42Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA5001-NODE02192.168.0.43Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA5001-NODE03192.168.0.44Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB

Before you start

  1. A small quota, and a Pod that no longer fits the rules

  2. The limit, enforced

Official sources